Request Format

Bulk API and JSON Streaming

For bulk data loading capability, the Bulk API service uses JSON and its inherent ability to store business data as objects and stream that data, as required, in text format. Because the service is intended for data ingestion, its create and update routes are bulk-first and are based on the NDJSON (newline-delimited JSON) format, a more appropriate one for JSON streaming. The following is a basic line-delimited JSON example:

 {"may":{"include":"nested","objects":["and","arrays"]}} 

For more information about NDJSON, visit http://ndjson.org and http://jsonlines.org

HTTP Request Line

A Bulk API request over HTTP must name the HTTP method, the endpoint, and the protocol (HTTP/1.1).

HTTP Request Headers

Every Bulk API request over HTTP must specify the authentication method (Bearer) followed by a valid, Tulip-issued bearer token as a single line in the HTTP header:

 Authorization: Bearer <your_token> 

HTTP Request Payloads

Each line of HTTP request payload must be a be a valid JSON object in NDJSON format, most commonly objects and arrays that conform to the Tulip Bulk API data model and perform operations on backend resources and records.

URIs for Endpoint Routes

Bulk API call URIs follow the following convention:

https://cluster/dal/dataAccess/version/route

Replace:

  • cluster — with your actual cluster address (e.g. v61-prod-bestbaked.tulipretail.com)
  • version — with the version of the Tulip Bulk API service (e.g. v1)
  • route — with the required route as documented in the Bulk API endpoint reference “Resource Endpoints”)(e.g.catalog/products)

Examples:

 GET https://{{cluster_name}}-{{client_name}}/dal/dataAccess/v1/catalog/catalogs/123PUT https://{{cluster_name}}-{{client_name}}.tulipretail.com/dal/dataAccess/v1/catalog/categories// PUT requests need request body for update request passed in as NDJson - All fields must be populated in request even if a single field was updated 

See also: Supported HTTP Methods