Customs API Documentation
Description
Customs API gives possiblity to manage customs information on existing booking in UB system. The API is based on a WCF Service with a RESTful implementation.
For access and testing of the Customs API please call the following web address:
Test: http://customsapi-test.azurewebsites.net/[function-name]
Production: http://ubapimanagement.azure-api.net/customsapiprod/[function-name]
For easy testing, an extension like Postman can be used.
AddCustomsInformation v1.0 Last modified: 2020-11-09
Summary
Add customs information to an existing shipment on UB systems.
URL
http://ubapimanagement.azure-api.net/customsapitest/AddCustomsInformation
Method
POST
Headers
Content-Type: application/jsonAuthorization: Basic username:password
Request example
{
"ccCommodityCode": "DK",
"commodityCode": 123456789,
"grossWeight": 8,
"countryOfOrigin": "PL",
"composition": null,
"dangerousGoodsCode": "DANMG",
"netWeight": 10,
"itemDescription": "Clothes",
"itemNo": 1000000000,
"quantity": 100,
"currencyCode": "DKK",
"itemName": "Louis Vitton",
"skuNumber": "GAMT",
"invoicePrice": 1000000,
"colliAwb": "12307446",
"dangerousGoods": false,
"invoiceNumber": "123123DK",
"companyNumber": "3336659",
"eoriNumber": "123666555",
"truckIdentifier": "BK 11111"
}
Parameters
| Name | Type | Required | Description | Max length |
|---|---|---|---|---|
| colliAwb | string |
The colli AWB received in the response from the booking API | - | |
| itemNo | string |
Item number for the given article | 255 | |
| itemName | string |
Item name for the given article | 255 | |
| itemDescription | string |
Item description for the given article | 255 | |
| composition | string |
Item composition for the given article | 255 | |
| skuNumber | string |
Item variant number for the given article | 255 | |
| quantity | int |
Quantity of the given item in the parcel | - | |
| countryOfOrigin | string |
Country of manufacturer of the item | 2 | |
| netWeight | decimal |
Combined actual weight of an item in the parcel | - | |
| grossWeight | decimal |
Combined total weight of an item in the parcel (total weight includes wrapping, packaging etc.) | - | |
| invoicePrice | decimal |
Invoiced price for a single piece of item | - | |
| currencyCode | string |
Currency code of the invoiced price in ISO 4217 standard | 3 | |
| commodityCode | string |
HS Code for the given item | - | |
| ccCommodityCode | string |
255 | ||
| dangerousGoods | bool? |
If the item is classified as dangerous goods | 1 | |
| dangerousGoodsCode | string |
Code of the dangerous good classification | 255 | |
| invoiceNumber | string |
Number of the commercial invoice for the given article | 255 | |
| companyNumber | string |
Internal customer number | 255 | |
| eoriNumber | string |
EORI number or VAT number | 255 | |
| truckIdentifier | string |
Truck license plate number | 255 | |
| procedureType | string |
Customs procedure type | 35 | |
| procedureCode | string |
Customs procedure code depending on the type of procedure type | 20 |
Response
Successfull response object will have StatusCode of 200 and customs object.
Unsuccessfull response object will have StatusCode and error message.
Example of response with an error
{"StatusCode": 400,"ErrorMessages": ["Specified ColliId is not correct"]}
Example of succesfull response
{
"statusCode": 200,
"successObject": "Customs information for colli 12307446 successfully created"
}
UpdateCustomsInformation v1.0 Last modified: 2020-11-09
Summary
Update customs information to an existing shipment with customs added on UB systems.
URL
http://ubapimanagement.azure-api.net/customsapitest/UpdateCustomsInformation
Method
PUT
Headers
Content-Type: application/jsonAuthorization: Basic username:password
Request example
{
"ccCommodityCode": "UK",
"commodityCode": 123456789,
"grossWeight": 8,
"countryOfOrigin": "PL",
"composition": null,
"dangerousGoodsCode": "DANMG",
"netWeight": 10,
"itemDescription": "Clothes",
"itemNo": 1000000000,
"quantity": 100,
"currencyCode": "DKK",
"itemName": "Louis Vitton",
"skuNumber": "GAMT",
"invoicePrice": 1000000,
"colliAwb": "12307446",
"dangerousGoods": false,
"invoiceNumber": "123123DK",
"companyNumber": "3336659",
"eoriNumber": "123666555",
"truckIdentifier": "BK 11111"
}
Parameters
| Name | Type | Required | Description | Max length |
|---|---|---|---|---|
| colliAwb | string |
The colli awb received in the response from the booking API | - | |
| itemNo | string |
Item number for the given article | 255 | |
| itemName | string |
Item name for the given article | 255 | |
| itemDescription | string |
Item description for the given article | 255 | |
| composition | string |
Item composition for the given article | 255 | |
| skuNumber | string |
Item variant number for the given article | 255 | |
| quantity | int |
Quantity of the given item in the parcel | - | |
| countryOfOrigin | string |
Country of manufacturer of the item | 2 | |
| netWeight | decimal |
Combined actual weight of an item in the parcel | - | |
| grossWeight | decimal |
Combined total weight of an item in the parcel (total weight includes wrapping, packaging etc.) | - | |
| invoicePrice | decimal |
Invoiced price for a single piece of item | - | |
| currencyCode | string |
Currency code of the invoiced price in ISO 4217 standard | 3 | |
| commodityCode | string |
HS Code for the given item | - | |
| ccCommodityCode | string |
255 | ||
| dangerousGoods | bool? |
If the item is classified as dangerous goods | 1 | |
| dangerousGoodsCode | string |
Code of the dangerous good classification | 255 | |
| invoiceNumber | string |
Number of the commercial invoice for the given article | 255 | |
| companyNumber | string |
Internal customer number | 255 | |
| eoriNumber | string |
EORI number or VAT number | 255 | |
| truckIdentifier | string |
Truck license plate number | 255 | |
| procedureType | string |
Customs procedure type | 35 | |
| procedureCode | string |
Customs procedure code depending on the type of procedure type | 20 |
Response
Successfull response object will have StatusCode of 200 and success message.
Unsuccessfull response object will have StatusCode and error message.
Example of response with an error
{
"StatusCode": 400,
"ErrorMessages": [
"Specified ColliId is not correct"
]
}
Example of succesfull response
{
"statusCode": 200,
"successObject": "Customs information for colli 12307446 successfully updated"
}
DeleteCustomsInformation v1.0 Last modified: 2020-11-09
Summary
Delete all customs information from an existing shipment on UB systems.
URL
http://ubapimanagement.azure-api.net/customsapitest/DeleteCustomsInformation
Method
DELETE
Headers
Content-Type: application/jsonAuthorization: Basic username:password
Request example
HTTP DELETE https://ubapimanagement.azure-api.net/customsapitest/DeleteCustomsInformation?colliAwb=1234&itemNo=32&skuNumber=622ASD
Parameters
| Name | Type | Required | Description | Max length |
|---|---|---|---|---|
| colliAwb | string
| |||
| itemNo | string
| |||
| skuNumber | string
|
Response
Successfull response object will have StatusCode of 200 and success message.
Unsuccessfull response object will have StatusCode and error message.
Example of response with an error
{
"StatusCode": 400,
"ErrorMessages": [
"There is no customs information to delete on colli with id 12307446"
]
}
Example of succesfull response
{
"statusCode": 200,
"successObject": "Customs information for colli 12307446 successfully removed"
}