SaveBillToLocation (POST)

Overview

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

Request
[
      {
         "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"
            }
         ]
      }
]

 

Response
{
  "data": null,
  "statusCode": "String",
  "errorDetails": [
    {
      "key": "string",
      "errors": [
        {
          "errorCode": "string",
          "errorDescription": "string"
        }
      ]
    }
  ],
  "successDetails": [
    {
      "key": "String"
    }
  ]
}

 

Examples

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": []
}

 

Data Elements
 

BillToLocation

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.1

BilltoLocationName

Yes

String (100)

Name of this Bill To location

  • BillToLocationName is mandatory

  • Max length for BillToLocationName is 100

1.2

BilltoLocationNumber

Yes

String (100)

Number of this Bill To location

  • BillToLocationNumber is mandatory

  • Max length for BillToLocationNumber is 100

1.3

AddressLine1

Yes

String (500)

Address line 1 of the entity

  • AddressLine1 is mandatory

  • Max length for AddressLine1 is 500

1.4

City

Yes

String (50)

City of the entity

  • City is mandatory

  • Max length for City is 50

1.5

StateCode

Yes

String (10)

State code of the entity

  • StateCode is mandatory

  • Max length for StateCode is 10

  • Invalid State

1.6

Zip

Yes

String (10)

Zip code of the entity

  • ZipCode is mandatory

  • Max length for ZipCode is 10

1.7

CountryCode

Yes

String (2)

Country code of the entity

  • CountryCode is mandatory

  • Max length for CountryCode is 2

  • Invalid Country

1.8

AddressLine2

No

String (100)

Address line 2 of the entity

  • Max length for AddressLine2 is 100

1.9

AddressLine3

No

String (100)

Address line 3 of the entity

  • Max length for AddressLine3 is 100

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

LstOrgEntity

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

  • Invalid EntityCode in OrgEntity

  • Multiple records available for EntityCode

  • Either or only one EntityCode in OrgEntity can have IsDefault flag as True

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

  • Some of the EntityType in OrgEntity do not match with setting EntityMappedToBilltoLocation

1.14.4

LobEntityCode

No

String

Lob Entity Code of the entity

  • Invalid LOBEntityCode