Add Records

Add Records

Add Records

This API adds one or more records. Subject to validations, each JSON object in the input file will be added as a record. A maximum of 200 records can be created per request.

Request URL

https://creator.zoho.com/api/v2/icscaler/courier-marketplace-fleet-center/form/<API name>

Request method

POST

Header

Authorization: OAuth Bearer 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf

Understanding the response

The success or failure of the API will be conveyed in its response. The response of the Add Records API includes the following keys:

  • result – This key will contain the details about the records created by this API.
  • code – At the overall request’s level, this key denotes its success or failure. Inside the “result” key, this key denotes the success or failure of creating records for each JSON object (given as part of the API request).
  • message
    • When the API request includes “message”: true, the response will contain “message”:”Data Added Successfully”.
    • When the API request includes “message”: false or does not include this the message key, the response will contain “message”:”Data Added Successfully”
  • data – This key will list the ID of the records created. It will also list other field values from the created records when you include the fields inside the “fields” key of your API request. Refer to the sample input and sample response sections on this page.

Sample Request

curl "https://creator.zoho.com/api/v2/icscaler/courier-marketplace-fleet-center/form/Assign_a_Driver"
-X POST
-d "@newrecords.json"
-H "Authorization: Bearer 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

In this example, “@newrecords.json” is the file that contains the input data, which the Add Records API will add to the Assign a Driver (Orders) table.

Sample input to add one record

{
    "data": {
        "Order_ID": 123456,
        "Customer_ID": 1009,
        "Pro_Order_ID": "123456",
        "External_ID": "WO-99999",
        "Status": "Pending",
        "Pickup_Customer": "Teamsters Local Union",
        "Pickup_Address": {
            "address_line_121": "4154 High Meadow Lane",
            "address_line_221": "",
            "district_city21": "Scranton",
            "state_province21": "PA",
            "postal_Code21": "18503"
        },
        "Delivery_Customer": "BP Sanitation",
        "Delivery_Address": {
            "address_line_131": "999 S Keyser Ave",
            "address_line_231": "",
            "district_city31": "Taylor",
            "state_province31": "PA",
            "postal_Code31": "185173"
        },
        "Pickup_From_Time": "08-27-2021 12:00:00",
        "Pickup_To_Time": "08-27-2021 13:00:00",
        "Delivery_From_Time": "08-27-2021 14:00:00",
        "Delivery_To_Time": "08-27-2021 16:00:00",
        "Pieces1": "5",
        "Weight1": "50",
        "Base_Rate": "195.00",
        "Notes": "string",
    }
}

Sample response upon adding one record

{
    "code": 3000,
    "data": {
        "ID": "3998750000000870007"
    },
    "message": "Data Added Successfully"
}

Sample input to add multiple records

{
  "data": [
    {
      "Email": "jason@mycompany.com",
      "Phone_Number": "+16103948336"
    },
    {
      "Email": "p.boyle@mycompany.com",
      "Phone_Number": "+12096173907"
    }
  ],
  "result": {
    "fields": [
      "Phone_Number",
      "Email"
    ],
    "message": true,
    "tasks": true
  }
}

Sample response upon adding multiple records

{
  "result": [
    {
      "code": 3000,
      "data": {
        "Email": "jason@mycompany.com",
        "Phone_Number": "+16103948336",
        "ID": "3888833000000121319"
      },
      "message": "Data Added Successfully!",