Batch Calls

This page explains the process required to make a batch call to any endpoint.

Insert multiple products

POST https://app.gem-books.com/api/RESOURCE_ENDPOINT

This endpoint allows you to create a batch call for an endpoint.

** Refer to endpoint for body details

Notes

  • Batch calls are supported for all endpoints that accept POST requests.

  • The input must be a JSON array of objects.

  • Each object in the array is processed independently.

  • The order of the results matches the order of the input objects.

  • If you send a single object (not an array), the API behaves as usual.

Headers

Name
Type
Description

Authentication

string

Bearer token.

Content-Type

string

Should be application/json.

Accept

string

Should be application/json.

Request Body

Example of request body for an endpoint

Name
Type
Description

code

string

Product code.

name_fr

string

Product French name.

name_en

string

Product English name.

Body example

Update multiple products

PUT https://app.gem-books.com/api/RESOURCE_ENDPOINT

This endpoint allows you to create a batch call for an endpoint.

** Refer to endpoint for body details

Notes

  • Batch calls are supported for all endpoints that accept POST requests.

  • The input must be a JSON array of objects and the body must contain the ID for each record.

  • Each object in the array is processed independently.

  • The order of the results matches the order of the input objects.

  • If you send a single object (not an array), the endpoint requires the :id: the API behaves as usual.

Headers

Name
Type
Description

Authentication

string

Bearer token.

Content-Type

string

Should be application/json.

Accept

string

Should be application/json.

Request Body

Example of request body for an endpoint

Name
Type
Description

id

int

ID of the record

code

string

Product code.

name_fr

string

Product French name.

name_en

string

Product English name.

Body example

Last updated