Product Monitor API Documentation

General information #

Base url #

https://partner.hustlegotreal.com/api/productmonitor

Authentification #

All calls must include a header “token” with the public token provided.

Example

“token”: “UzeLodERPrLhyNPYfk/nFanUfwcP19sibK-h7ToAXbrcqE69G1”

Request and Responses #

In case of a method Post, body data must be send in json format.

Responses will always be JSON objects that will contain next format.

FieldType 
statusstringValues: SUCCESS, ERROR
errorError TypeOnly if status is ERROR
resultVaries by endpointOnly if status is SUCCESS

Example #

{    
  "status":"ERROR",    
  "error":{
    "code":"ERR_02",
    "description":"Url empty or invalid"
  }
}

Endpoints #

List #

PathMethod
/addPost
/removePost
/listGet
/callcounterGet

/Add #

Method: Post

Adds a product to the list to be monitored.

Body request #

FieldTypeNotes
urlstring 
countrystringISO 3166: US, ES, DE, IT…
conditionnumber(OPTIONAL) Condition Enum

Example #

{    
  "url":"https://www.amazon.co.uk/dp/B005EJH6Z",    
  "country":"GB",
  "condition": 0
}

Response result #

Result will be always empty.

/Remove #

Method: Post

Removes a product to the list to be monitored.

Body request #

FieldTypeNotes
urlstring 
countrystringISO 3166: US, ES, DE, IT…
conditionnumber(OPTIONAL) Condition Enum

Example #

{    
  "url":"https://www.amazon.co.uk/dp/B005EJH6Z",    
  "country":"GB",
  "condition": 0
}

Response result #

Result will be always empty.

/List #

Method: Get

Get all current active products

No parameters or body is required.

Response result #

FieldTypeNotes
productsArray of Product type 

Example #

{    
  "products": [
    {
      "url": "https://www.amazon.co.uk/dp/B005EJH6Z",
      "country": "GB",
      "condition": 0
    },
    {
      "name": "https://www.zavvi.es/14228657.html",
      "country": "ES",
      "condition": 3
    }
  ]
}

/CallCounter #

Mehod: Get

Get the count of different products that have been monitorized this current month.

No parameters are needed

Response #

FieldTypeNotes
quantityint 

Example #

{
  "quantity":25
}

Webhooks #

Webhooks are requests that HGR will make to your endpoint. If you want to make sure that HGR is the one making this request, follow the steps below:

  • Get the body from the request, apply Hmac SHA-256 using your Private Key
  • Convert the result to base 64. 
  • With the request, you will receive a header called «X-HGR-Hmac-SHA256». 
  • The hash you have generated should match the hash in this header. 

Only someone who knows your private key should be able to generate this hash, so only HGR and you could be the authors of this message as long as the key is not leaked.

Product Changed #

Method: Post

Everytime a product change is detected you your weebhook will be called. If options is empty, this product is out of stock.

Body request #

FieldTypeNotes
changesArray of Change Type 

Example #

{ 
  "changes":[
    {
      "url":"https://www.amazon.co.uk/dp/B005EJH6Z",    
      "country":"GB",
      "condition": 2,
      "options":[
        { "price":22.5, "shipping": 3, "prime": 1, "warehouse": "GB" },
        { "price":22.0, "shipping": 12, "prime": 0, "warehouse": "CN"}
      ]
    },
    {
      "url":"https://www.amazon.es/dp/B0BGP7P6H9",    
      "country":"ES",
      "condition": 0,
      "options":[
        { "price":63.7, "shipping": 2, "prime": 1, "warehouse":null },
      ]
    }
  ]
}

Response result #

You must response with a 200 status, otherwise system will try later to send again this information.

Types #

Error Type #

FieldTypeNotes
codestringValues contained in Error List
descriptionstring 

Example #

{
  "code":"ERR_05",
  "description":"Unknown error"
}

Error List #

CodeDescription
ERR_01Your Token is wrong
ERR_02Url empty or invalid
ERR_03Country wrong or invalid
ERR_04Unable to obtain product information
ERR_05Unknown error
ERR_06Supplier or country not recognised. Try looking for this supplier in a different country
ERR_07Wrong request key
ERR_08Product information is not yet available
ERR_09Product doesn’t exists

Option Type #

FieldTypeNotes
pricenumber 
shippingnumberShipping time days
primenumberPrime Enum
warehousestringNullable, ISO 3166: CN, US, ES…

Example #

{
  "price":456.3,
  "shipping": 3,
  "prime": 0,
  "warehouse":"CN"
}

Product Type #

FieldTypeNotes
urlstring 
countrystringISO 3166: US, ES, DE, IT…
conditionnumberCondition Enum

Example #

{
  "name": "https://www.zavvi.es/14228657.html",
  "country": "ES",
  "condition": 1
}

Change Type #

FieldTypeNotes
urlstring 
countrystringISO 3166: US, ES, DE, IT…
conditionnumberCondition Enum
optionsOption Type 

Example #

{
  "url":"https://www.amazon.co.uk/dp/B005EJH6Z",    
  "country":"GB",
  "condition": 2,
  "options":[
    { "price":22.5, "shipping": 3, "prime": 1, "warehouse": null },
    { "price":22.0, "shipping": 12, "prime": 0, "warehouse": null }
  ]
}

Condition enum #

MeaningValue (Amazon)
0New (default)
1Like New
2Very Good
3Good
4Acceptable

Prime enum #

MeaningValue (Amazon)
0Not Prime
1Prime

Funciona con BetterDocs

Scroll hacia arriba