What API do I use to create/update Transporter?
API Endpoint: v1/api/integration/transporter
Method: POST
Request Format: JSON structure
Example JSON structure:
Creating transporter only with mandatory attributes:
JSON[ { "name": "Transporter_4", "xid": "Transporter_4_xid1234" } ]Creating transporter with purchaser:
JSON[ { "name": "Transporter_1", "purchaser": { "name": "Universal Purchaser" }, "xid": "Transporter_1_xid_10" }, { "name": "Transporter_2", "purchaser": { "id": 8978 }, "xid": "Transporter_2_xid_20" } ]Updating associated purchaser for transporter:
JSON[ { "id": 16014, "purchaser": { "id": 8978 } }, { "xid": "Transporter_2_xid_20", "purchaser": { "name": "BRIDGER TRANSPORTATION, LLC " } } ]
Mandatory Fields:
Attributes | Attribute Key | Constraints |
Name | name | Required when creating a transporter. |
XID | xid | Required when creating a transporter. Required when updating transporter if id not provided. |
Id | id | When updating a record, either the id or xid must be provided. |
Non-Mandatory Fields:
Attributes | Attribute Key | Constraints |
Purchaser Id / Purchaser Name | id / name | To specify a purchaser for any transporter, either the purchaser's id or name must be provided. |
Is Active | isactive | Default value: |
Is For Water | isforwater | Default value: |
Is For Oil | isforoil | Default value: |
Is For NGL | isforngl | Default value: |
Note: Details for other non-mandatory fields can be found in the Swagger documentation.
Response Format:
{
"success": true,
"message": "Some records were invalid, please correct and retry",
"numProcessedItems": 1,
"numUnProcessedItems": 3,
"secondaryErrors": [],
"output": {
"processedItems": [
{
"record": {
"name": "Transporter_4",
"purchaserid": null,
"createdby": 46498,
"createdon": "2024-09-24T16:14:37.827Z",
"modifiedby": 46498,
"modifiedon": "2024-09-24T16:14:37.827Z",
"xid": "Transporter_4_xid1234",
"code": null,
"isactive": true,
"isforwater": false,
"isforoil": true,
"isforngl": false,
"tenantid": "9e873211-3a18-4b95-b9ad-32882c2ef508",
"address": null,
"city": null,
"state": null,
"zipcode": null,
"phonenumber": null
},
"message": "record succesfully created"
}
],
"unProcessedItems": [
{
"record": {
"name": "Transporter_1"
},
"message": "SchemaError : \"value\" must contain at least one of [id, xid]"
},
{
"record": {
"name": "Transporter_2",
"purchaser": {
"name": "Universal Purchaser"
}
},
"message": "SchemaError : \"value\" must contain at least one of [id, xid]"
},
{
"record": {
"name": "Transporter_3",
"purchaser": {
"id": 8978
}
},
"message": "SchemaError : \"value\" must contain at least one of [id, xid]"
}
]
}
}
Common Reason for API failure:
What might be the issue | What is the resolution |
If name is not provided while creating new record | Provide name for creating transporter. |
"value" must contain at least one of [id, xid] | Either the id or xid must be provided. |
xid already exists for record | Unique xid should be provided. |