Skip to main content

REST API Integration

SFTP handles daily full catalog snapshots, while the REST API is used for real-time incremental updates during the day. This chapter covers the complete Product Feed REST API reference.

4.1 Authentication

All API requests must include a Bearer token in the Authorization header:
API keys are assigned by OpenAI after the merchant receives partner approval.

4.2 Required HTTP Headers

Every API request must include the following headers: API Version: Currently uses 2025-09-12. The version number ensures forward compatibility of API behavior. Timestamp format: Must use RFC 3339 format, such as 2026-04-11T08:30:00Z or with a timezone offset.

4.3 Feeds Endpoints

Create a Feed

Response:

Query a Feed

Response: Returns a Feed object containing id, target_country, and updated_at.

4.4 Products Endpoints

List Products

Returns all products under the specified Feed.

Upsert Products

PATCH semantics: Uses upsert logic. Products are matched by id:
  • If the ID already exists — update that product
  • If the ID does not exist — create a new product
  • Products not included in the request — remain unchanged (they are not deleted)
This differs from SFTP full snapshots. The API PATCH does not delete products that are not mentioned; it only affects products included in the request.

4.5 Promotions Endpoints

List Promotions

Upsert Promotions

Promotion data can only be submitted via the REST API. SFTP file upload is not supported for promotions.

4.6 Error Handling

400 error example:
404 error example:

4.7 Idempotency

Request idempotency is achieved through the Idempotency-Key header. Repeated requests with the same key will not produce side effects.
Usage guidelines:
  • Generate a unique key for each logical batch
  • Safe to retry with the same key after network timeouts
  • Keys are typically composed of a business identifier + timestamp
  • Different batches must use different keys

4.8 Best Practices

Small-Batch Validation First

Before full automation, start with a small batch of approximately 100 products:

API and SFTP Coordination

Header Checklist

Confirm the following headers are complete before every API call:

Next chapter: Chapter 5: Promotions Management — Promotion object specification, discount types, and active periods