This POST API can be used to capture new additions in Bill to Location details from ERP into GEP SMART to be used as reference in P2P transactions.
URL Format: https://<Instance>/SmartInterfaceAPI/api/BillToLocation/BillToLocationDetails
[
{
"billToLocationName": "String",
"billToLocationNumber": "String",
"addressLine1": "String",
"addressLine2": "String",
"addressLine3": "String",
"city": "String",
"stateCode": "String",
"zip": "String",
"countryCode": "String",
"isDeleted": false,
"isDefault": true,
"stateOther": "String",
"lobEntityCode": " String",
"lstOrgEntity": [
{
"entityCode": "String",
"isDefault": true,
"entityType": " String",
"lobEntityCode": " String"
}
]
}
]
{
"data": null,
"statusCode": "String",
"errorDetails": [
{
"key": "string",
"errors": [
{
"errorCode": "string",
"errorDescription": "string"
}
]
}
],
"successDetails": [
{
"key": "String"
}
]
}
Success Scenario - Request
Below request only contains the mandatory attribute(s):
[
{
"billToLocationName": "billToLocationName12",
"billToLocationNumber": "BillToLocNum_12",
"addressLine1": "REMARKABLES PARK",
"city": "QUEENSTOWN",
"stateCode": "AK",
"zip": "00000",
"countryCode": "US"
}
]
Success Scenario - Response
{
"data": {
"billToLocationName": "billToLocationName44",
"billToLocationNumber": "BillToLocNum_12",
"addressLine1": "REMARKABLES PARK",
"addressLine2": "",
"addressLine3": "",
"city": "QUEENSTOWN",
"stateCode": "AK",
"zip": "00443",
"countryCode": "US",
"isDeleted": false,
"isDefault": false,
"stateOther": "",
"lobEntityCode": null,
"lstOrgEntity": null
},
"statusCode": "200",
"errorDetails": [],
"successDetails": [
{
"key": "BillToLocNum_12"
}
]
}
Error Scenario 1 - Request
Below request contains a missing value of the mandatory attribute – BillToLocationName:
[
{
"billToLocationNumber": "BillToLocNum_12",
"addressLine1": "REMARKABLES PARK",
"city": "QUEENSTOWN",
"stateCode": "AK",
"zip": "00000",
"countryCode": "US"
}
]
Error Scenario 1 - Response
{
"data": null,
"statusCode": "400",
"errorDetails": [
{
"key": "3333",
"errors": [
{
"errorCode": "DataValidation",
"errorDescription": "Invalid BillToLocation Number"
}
]
}
],
"successDetails": []
}
Error Scenario 2 - Request
Below request contains the invalid attributes of Country Code, and Zip Code:
[
{
"billToLocationName": "billToLocationName44",
"billToLocationNumber": "BillToLocNum_12",
"addressLine1": "REMARKABLES PARK",
"city": "QUEENSTOWN",
"stateCode": "AK444",
"zip": "004434343000",
"countryCode": "UUUUU"
}
]
Error Scenario 2 – Response
{
"data": null,
"statusCode": "400",
"errorDetails": [
{
"key": "BillToLocNum_12",
"errors": [
{
"errorCode": "LengthValidation",
"errorDescription": "Max Length for CountryCode is 2"
},
{
"errorCode": "LengthValidation",
"errorDescription": "Max Length for Zip is 10"
},
{
"errorCode": "DataValidation",
"errorDescription": "Invalid Country."
}
]
}
],
"successDetails": []
}
BillToLocation |
|||||
S.No. |
Property |
Required? |
Data type |
Description |
Validations/Exceptions |
1.1 |
BilltoLocationName |
Yes |
String (100) |
Name of this Bill To location |
|
1.2 |
BilltoLocationNumber |
Yes |
String (100) |
Number of this Bill To location |
|
1.3 |
AddressLine1 |
Yes |
String (500) |
Address line 1 of the entity |
|
1.4 |
City |
Yes |
String (50) |
City of the entity |
|
1.5 |
StateCode |
Yes |
String (10) |
State code of the entity |
|
1.6 |
Zip |
Yes |
String (10) |
Zip code of the entity |
|
1.7 |
CountryCode |
Yes |
String (2) |
Country code of the entity |
|
1.8 |
AddressLine2 |
No |
String (100) |
Address line 2 of the entity |
|
1.9 |
AddressLine3 |
No |
String (100) |
Address line 3 of the entity |
|
1.10 |
IsDefault |
No |
Boolean |
A flag used to denote if the Bill To location is the default Bill To location or not |
|
1.11 |
IsDeleted |
No |
Boolean |
A flag used to denote if the Ship To location is soft deleted or not |
|
1.12 |
StateOther |
No |
String |
State which is different from the list of states provided |
|
1.13 |
LobEntityCode |
No |
String |
Line of Business Code for BillToLocation |
|
1.14 |
No |
List of OrgEntity object |
Check data type OrgEntity for details |
|
LstOrgEntity |
|||||
S.No. |
Property |
Required? |
Data type |
Description |
Validations/Exceptions |
1.14.1 |
EntityCode |
No |
String |
Entity Code of the entity |
|
1.14.2 |
IsDefault |
No |
Boolean |
A flag used to denote if entity is the default or not |
|
1.14.3 |
EntityType |
No |
String |
Entity Type of the entity |
|
1.14.4 |
LobEntityCode |
No |
String |
Lob Entity Code of the entity |
|