Articles on: For developers
This article is also available in:

Synchronizing your website’s prices and availability with Pricer24

Pricer24 can notify your system about changes in product prices or availability.


To connect this service, you need to implement an endpoint that will handle requests from Pricer24 and provide its address to our technical support.


How It Works


  • When price or availability changes in Pricer24, the system adds information about this to the queue.
  • By default, a service runs every 2 minutes that groups changes into batches of 100 and sequentially sends POST requests to the endpoint via HTTP/HTTPS.
  • If a 200 response code is received, the changes are marked as processed, and the system sends the next batch of changes. Otherwise, the service is interrupted, and the changes will be resent during the next run. This continues until a 200 response code is received.
  • The time limit for request processing is 1 minute, after which the service will stop and request processing will be considered unsuccessful.


Requests are formed not only when the price changes but also when any product property, such as name or tags, changes.


Contract


The system forms and sends POST requests to your endpoint.


Example request:


{
"Data": [
{
"EntityType": "product",
"EntityId": "273555",
"Entity": {
"Id": "2db16c12-40a6-4e6c-848d-0f139bd8ef54",
"ExternalId": "273555",
"Name": "1stPlayer B7-R1 Color LED без БП Black",
"Availability": {
"Id": "eda9817f-9c2a-4aa1-9caa-5a12fa90cfcc",
"UnifiedName": "in_stock",
"IsAvailable": true
},
"Tags": [
{
"Id": "de71e492-b4dd-4d97-b88a-372358a1ed8f",
"Name": "new",
"Color": "#000000"
}
],
"Prices": [
{
"Id": "500aea54-e841-4778-9777-9c2b39236291",
"Name": "Главная",
"UnifiedName": "price",
"IsMain": true,
"Price": 1328.0,
"Currency": "UAH"
},
{
"Id": "1bd3c67f-de03-482b-a507-b852053000dd",
"Name": "TEST_PRICE",
"UnifiedName": "test",
"IsMain": false,
"Price": 52.0,
"Currency": "USD"
}
]
}
}
],
"Secret": ""
}


Change information is contained in the Data array.

  • EntityType – the type of the object that was changed
  • EntityId – the code of the object (product) in your system
  • Entity – information about the object (product) itself


Secret – a secret key needed to validate the requests your endpoint receives (so you can be sure the requests are coming from Pricer24).


In this article, we only consider requests for the product object.


Entity Object


  • Id – product code in Pricer24
  • ExternalId – product code in your system
  • **Name ** – product name
  • **Availability ** – product availability
  • **Tags ** – array of product tags
  • Prices – array of product prices


Availability Object


  • Id – availability code in Pricer24
  • UnifiedName – availability alias
  • IsAvailable – whether the product is in stock


Tag Object


  • Id – tag code in Pricer24.
  • UnifiedName – tag alias
  • **Color ** – tag color in HEX format


Price Object


  • Id – price type code in Pricer24
  • **Name ** – price type name in Pricer24
  • UnifiedName – price type alias
  • **IsMain ** – whether the price type is the main one (main price type is created during the initial setup and can be used as default price type while displaying the products)
  • Price – price (nullable)
  • Currency – ISO currency code of the price (nullable)

Updated on: 28/08/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!