GEM-SUITE - API
  • Introduction
  • API Reference
    • Authentication
    • Resources
      • Company
      • Branches
      • Clients
        • Contacts
      • Providers
      • Resources
      • Products
      • Projects
        • Tasks
      • Reminders
      • Bookings
        • Stops
        • Actions
      • Documents
      • Transactions
      • Categories
      • Sales
        • Payments
        • Products
        • Departments
        • Documents
      • Purchases
        • Products
        • Documents
      • Vehicles
        • Brands
        • Models
      • Agenda
        • Appointments
        • Displays
        • Bays
        • Workflows
    • Objects
      • Branch
      • Client
      • Provider
      • Product
      • Project
        • Task
      • Booking
        • Stop
        • Action
      • Transaction
      • Sale
        • Product
      • Agenda
        • Appointment
        • Display
        • Bay
        • Workflow
  • Batch Calls
Powered by GitBook
On this page

Batch Calls

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

Insert multiple a product

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.

{
    "results": [
        {
            "result": "success",
            "table_id": 22
        },
        {
            "result": "success",
            "table_id": 23
        },
        {
            "result": "success",
            "table_id": 24
        }
    ],
    "success": true
}

Body example

[
    {
      "code": "demo",
      "name_fr": "Produit demo",
      "name_en": "Demo Prodcut"
    },
    {
      "code": "005",
      "name_fr": "La Franchise",
      "name_en": "Franchise"
    },
    {
      "code": "006",
      "name_fr": "Autre",
      "name_en": "Other"
    }
]
PreviousWorkflow

Last updated 1 day ago