Items API Best Practices

Messages

Mini-batches and rate limiting

The items API has a rate limiter of 250 messages per second per tenant and per environment. To maximise the throughput of items, for example when sending a new catalogue, it is recommended to group multiple items in a single message.

It is recommended to keep the size of a message under 1MB. The average size of an item allows to calculate the maximum number of items to send in each message.

Connection settings and latency

To maximise the number of messages to send, it is recommended to:

  • Use http Keep-Alive through the header Connection:Keep-Alive

  • Send messages in an asyncronous way.

  • The items API is hosted in EU (GCP Belgium), please make sure that the sender is as close as possible to reduce the latency.

  • Ensure your code can detect errors and resend the message.

Dealing with item rejections

The items api can actively reject items under certain conditions, for example if the required attributes haven't been provided for an item, if the attributes provided have the incorrect basetype or if a product hasn't been assigned to a valid category.

It is therefore advised to log error messages returned by the items api and have a strategy to define under what conditions a new catalogue should or should not be activated.

Last updated