What API do I use to create/update tank strapping?
API Endpoint: v1/api/integration/tankstrapping
Method: POST
Request Format: JSON structure
Example JSON structure:
[
{
"name": "Tank_Strapping_1",
"description": "Tank_Strapping_1 description",
"tankstrappingdetails": [
{
"effectivefrom": "2024-09-18",
"effectiveto": null,
"rows": [
{
"fromheight": 0,
"toheight": 5,
"volumeperinch": 7.5
}
]
}
]
},
{
"name": "Tank_Strapping_2",
"description": "Tank_Strapping_2 description 2",
"deleteexistingtankstrappingdetails": true,
"tankstrappingdetails": [
{
"effectivefrom": "2024-09-18",
"effectiveto": null,
"rows": [
{
"fromheight": 5,
"toheight": 20,
"volumeperinch": 9.4
}
]
},
{
"effectivefrom": "2024-09-01",
"effectiveto": "2024-09-17",
"rows": [
{
"fromheight": 0,
"toheight": 5,
"volumeperinch": 7.5
}
]
}
]
}
]
Mandatory Fields:
Attributes | Attribute Key | Constraints |
Name | name | Required in case tank strapping is being created. |
Tank Strapping Details | tankstrappingdetails | At least 1 tank strapping details is required in case tank strapping is being created. |
Effective From | effectivefrom | In case tank strapping details is provided, effective from is mandatory. |
Effective To | effectiveto | In case tank strapping details is provided, effective to is mandatory. |
From Height | fromheight | In case tank strapping details is provided, from height is mandatory. |
To Height | toheight | In case tank strapping details is provided, to height is mandatory. |
Volume Per Inch | volumeperinch | In case tank strapping details is provided, volume per inch is mandatory. |
Delete Existing Tank Strapping Details | deleteexistingtankstrappingdetails | Is required only if past date has to be entered for effective from in tank strapping details. |
Response Format:
{
"success": true,
"message": "Success",
"numProcessedItems": 2,
"numUnProcessedItems": 0,
"secondaryErrors": [],
"output": {
"processedItems": [
{
"record": {
"name": "Tank_Strapping_1",
"xid": null,
"description": "Tank_Strapping_1 description",
"createdby": 46498,
"createdon": "2024-09-18 10:02:39.084",
"modifiedby": 46498,
"modifiedon": "2024-09-18T10:15:41.093Z",
"tenantid": "9e873211-3a18-4b95-b9ad-32882c2ef508",
"id": 442405
},
"message": "record succesfully Updated"
},
{
"record": {
"name": "Tank_Strapping_2",
"xid": null,
"description": "Tank_Strapping_2 description 2",
"createdby": 46498,
"createdon": "2024-09-18 10:13:44.219",
"modifiedby": 46498,
"modifiedon": "2024-09-18T10:15:41.093Z",
"tenantid": "9e873211-3a18-4b95-b9ad-32882c2ef508",
"id": 442406
},
"message": "record succesfully Updated"
}
],
"unProcessedItems": []
}
}
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 tank strapping |
If tank strapping details not provided while creating tank strapping | Provide at least 1 tank strapping details while creating tank strapping |
Past dates provided for effectivefrom in tankstrappingdetails | Provide current date or pass flag deleteexistingtankstrappingdetails with true value to allow past dates. |
Effective from is greater than effective to for tankstrappingdetails | Check the dates and make sure effectivefrom is smaller than effectiveto |
Dates overlap with another set for tankstrappingdetails | In case tankstrappingdetails have two records, make sure both records have separate set of effectivefrom and effectiveto. E.g., if one record has effectivefrom as |
Dates have gap with next date range for tankstrappingdetails | In case tankstrappingdetails have two records, make sure there is no gap in the last effectiveto and next effectivefrom. E.g., if one record has effectivefrom as |