Booking API v2 Documentation
Description
The Booking API gives the client the possibility to add and fetch a booking to and from the United Broker system. The API is based on a WCF Service with a RESTful implementation.
Version 2 of Booking API uses more secure way of authentication and has few changes on a booking object, which is used most of the responses on this API.
For access and testing of the Booking API please call the following web address:
Staging: https://ubapimanagement.azure-api.net/bookingapistaging/v2/[function-name]
Production: https://ubapimanagement.azure-api.net/bookingapiprod/v2/[function-name]
For easy testing, an extension like Postman can be used.
AddBookingBasic v2.0 Last modified: 2018-12-10
Summary
Adds simple booking
Description
The AddBookingBasic function gives the client the opportunity for adding a Booking to the United Broker system. This function is in a simple form, where the advanced form is a full booking, whereas the simple form will be enriched by the service before committing it to the system. The AddBookingBasic function demands an BasicBooking to be setup as JSON. Depending on the choice of format the function will also return the booking in the format.
URL
http://ubapimanagement.azure-api.net/bookingapistaging/v2/AddBookingBasic
http://ubapimanagement.azure-api.net/bookingapiprod/v2/AddBookingBasic
Method
POST
Headers
Content-Type: application/json
Authorization: Basic base64(username:password)
Request example
{ "CustomerIdentifier": 1000004144, "ProductId": 1000000191, "OrderNo": "TEST_ORDERNO", "PickupDt": "2019-10-29", "Services": [], "Messages": [], "ProviderType": 6, "LabelType": "PDF", "Addresses": [ { "Kind": 1, "Name1": "Random", "Name2": "Sender", "Attention": "Random ATT", "Street1": "Auerspergstraße 63", "Street2": null, "PostCode": "5020", "City": "Salzburg", "State": null, "CountryCode": "AT", "Phone": null, "Mobile": "00436621", "Email": "testemail@salzburg.at" }, { "Kind": 0, "Name1": "Random", "Name2": "Receiver", "Attention": "Random ATT", "Street1": "Mirabellplatz 5020", "Street2": null, "PostCode": "5020", "City": "Salzburg", "State": null, "CountryCode": "AT", "Phone": null, "Mobile": "00436622", "Email": "testreceiver@salzburg.at" } ], "Lines": [ { "Packages": [ { "ItemNo": 1 } ], "GoodsTypeId": "0", "PkgWeight": 1000, "Height": 5.8, "Length": 21.6, "Width": 10.0 } ], "References": [ ] }
Parameters
Name | Type | Required | Description |
---|---|---|---|
CustomerIdentifier |
int
|
Your identifier in the United Broker System | |
ProductId |
int
|
The product id used to identify the product in the United Broker System, and in the external providers systems. | |
OrderNo |
string
|
The order number of the shipment. | |
PickupDt |
date
|
Example: 2016-10-07. Parameter is required if there is a pick up service involved for the requested shipment. Some product are pick up product, and therefore the date need to be provided for these products. | |
Services |
array
|
Depending on the ProductId |
|
Messages |
array
|
Extra information for the shipment | |
ProviderType |
int
|
Currently these providers are available:
|
|
LabelType |
string
|
Type of Base64 encoded label, for example PDF or ZPL |
|
Addresses |
array
|
Sender and receiver should always be defined. | |
Lines |
array
|
||
References |
array
|
Extra information for the shipment | |
CashOnDeliveryData |
object
|
Extra information for CashOnDelivery products |
Sender, receiver
Name | Type | Required | Description |
---|---|---|---|
Kind |
int
|
Defines the kind of the address:
|
|
Name1 |
string
|
The name of the person | |
Name2 |
string
|
Only need if not enough space in Name1 | |
Attention |
string
|
Defines the name of another person than the sender or receiver. | |
Street1 |
string
|
The address of the receiver or sender | |
Street2 |
string
|
Only used if not enough space in Street1 | |
PostCode |
string
|
The post code of the address | |
City |
string
|
The city name of the address | |
State |
string
|
The state of the address. | |
CountryCode |
string
|
The country of the address. Format: ISO 3166-1 alpha-2 | |
Phone |
string
|
The landline phone number of the receiver or sender | |
Mobile |
string
|
The mobile number of the receiver or sender. | |
string
|
The email of the receiver or sender. |
Parcel shop
Name | Type | Required | Description |
---|---|---|---|
Kind |
int
|
Defines the kind of the address:
|
|
CustNo |
string
|
Id of the parcel shop | |
CountryCode |
string
|
The country of the parcel shop. Format: ISO 3166-1 alpha-2 |
Name | Type | Required | Description |
---|---|---|---|
GoodsTypeId |
string
|
Should always be defined, and it differs from product to product. Provide default value 0 if the wanted product does not require it. | |
PkgWeight |
int
|
The package weight of the shipment in grams | |
Height |
double
|
The height of the package in centimetres | |
Length |
double
|
The length of the package in centimetres | |
Width |
double
|
The width of the package in centimetres | |
Packages |
array
|
Name | Type | Required | Description |
---|---|---|---|
ItemNo |
int
|
If more packages are needed for a line, provide item number different from each other. Use 1, 2, 3... |
Name | Type | Required | Description |
---|---|---|---|
Kind |
int
|
Kind of reference. Used to identify the kind of reference in the system | |
Value |
string
|
The value of the reference |
Name | Type | Required | Description |
---|---|---|---|
Kind |
int
|
Kind of message. Used to identify the kind of message in the system | |
Text |
string
|
The value of the message |
Name | Type | Required | Description |
---|---|---|---|
Amount |
double
|
The amount of money needed to be requested for the cash on delivery action. | |
CurrencyCode |
string
|
The currency code used for the amount requested for the cash on delivery action. | |
BIC |
string
|
The BIC of the bank the money should be transfered to. | |
IBAN |
string
|
The IBAN of the bank account the money should be transfered to. | |
BankHolderName |
string
|
The name of the account holder of the bank account the money should be transfered to. | |
PaymentReference |
string
|
The reference of the payment that will be shown to the receiver (usually invoice or ordernumber). |
Response
If request was successful, system will return json response with information about the booking, including encoded (base64) label.
Successfull response object will have the StatusCode of "200"
.
Unsuccessfull response object will have the StatusCode of "400"
.
Example of response with an error
{ "statusCode": 400, "errorMessages": [ "Flow that you are trying to use is not currently available for AddBookingBasic" ] }
Example of succesfull response
{ "isUbsendField": false, "bookingHeader": { "pickupTerminal": null, "companyRegNumber": null, "number": "", "consigneeNumber": 1000004195, "consigneeName": "", "invoiceeNumber": 0, "invoiceeName": "", "locationID": 0, "locationName": "", "description": "", "currencyCode": "", "bookingId": 0, "providerId": 0, "lines": [ { "customerLineLength": 0.0, "customerLineWidth": 0.0, "customerLineHeight": 0.0, "customerLineVolume": 0.0, "customerLineWeight": 0.0, "customerLineVolumeWeight": 0.0, "customerLineLoadmeter": 0.0, "id": 0, "ubLineId": "0", "lineNumber": "", "shipmentDescription": "", "shipmentAWB": "8078600346", "carrierID": "1000000002", "carrierName": "", "subCarrierID": "1000000005", "subCarrierName": "", "purchaseProductID": "1000000216", "purchaseProductName": "", "goodsTypeKey1": 0, "goodsTypeName": "", "goodsTypeID": "0", "numberOfColli": 1, "unitType": 0, "unitTypeName": "", "length": 21.6, "width": 11.0, "height": 5.8, "weight": 1000.0, "volume": 0.0, "dimensionalWeight": 0.0, "loadmeter": 0, "shipCustomsValue": 0.0, "shipCustomsCurrency": "", "shipCODValue": 0.0, "shipCODCurrency": "", "insuranceValue": 0.0, "insuranceCurrency": "", "insuredBy": "", "dangerousGoods": false, "incoTerms": "", "sendersReference": "5e734226f5c667477ee80996", "receiversReference": "", "receiversReference2": "", "bookingSystem": "", "bookingSystemShipmentID": 0.0, "bookingSystemOrderNumber": 0.0, "salesChannelSystem": "", "salesChannelSystemShipmentID": 0.0, "salesChannelSystemOrderNumber": 0.0, "shipmentDirection": "", "shipmentPaymentDirection": "", "payerAccountAtCarrier": null, "senderAccountAtCarrier": null, "isDocument": true, "isEUShipment": true, "isReturn": false, "bookingCreated": "2020-03-19T09:57:59.0094422+00:00", "labelPrintDate": "1990-01-01T00:00:00", "transmitDate": "2020-03-19T09:57:59.0094435+00:00", "requestedPickupDateStart": "2020-03-25T00:00:00", "requestedPickupDateEnd": "2020-03-19T10:57:59.0094372+00:00", "requestedDeliveryDateStart": "2020-03-20T09:57:59.0094398+00:00", "requestedDeliveryDateEnd": "2020-03-20T10:57:59.0094329+00:00", "brandName": "", "carrierLineWeight": 0.0, "carrierLineHeight": 0.0, "carrierLineLength": 0.0, "carrierLineWidth": 0.0, "carrierLineVolume": 0.0, "carrierLineVolumeWeight": 0.0, "carrierLineLoadmeter": 0.0, "volumeIndicator": "", "invoiceWeight": 0.0, "scanLines": [], "specifications": [], "collies": [ { "bookingLineColliCustoms": null, "customerColliVolumeWeight": 0.0, "customerColliLoadmeter": 0.0, "ubColliId": "0", "colliID": 0, "itemNumber": "1", "colliAWB": "8078600346", "colliPackagingType": "", "colliGoodsType": "", "colliDescriptionOfContents": "", "customerColliLength": 0.0, "customerColliWidth": 0.0, "customerColliHeight": 0.0, "customerColliWeight": 0.0, "customerColliVolume": 0.0, "carrierColliWeight": 0.0, "carrierColliHeight": 0.0, "carrierColliLength": 0.0, "carrierColliWidth": 0.0, "carrierColliVolume": 0.0, "carrierColliVolumeWeight": 0.0, "carrierColliLoadmeter": 0.0 } ], "addresses": [ { "addressTypeName": null, "addressType": "10000000", "addressID": 0, "companyName": "Patrick Olsüüsen ", "name2": null, "contactName": "Patrick Olsüüsen ", "address1": "KLARABERGSGATAN 50", "address2": null, "address3": "", "city": "Stockholm", "zip": "11121", "country": "", "countryIATA": "SE", "attention": "Contact Name", "attentionPhone": null, "attentionMobile": "123123123", "attentionEmail": "the.mail@ubsend.com", "phone": null, "mobile": "0876493290", "email": "the.mail@ubsend.com", "description": "" }, { "addressTypeName": null, "addressType": "10000002", "addressID": 0, "companyName": "Max Mustermaëëëëënn ", "name2": null, "contactName": "Max Mustermaëëëëënn ", "address1": "HÃgbergsgatan 35", "address2": null, "address3": "", "city": "Stockholm", "zip": "11620", "country": "", "countryIATA": "SE", "attention": "", "attentionPhone": null, "attentionMobile": "123123123", "attentionEmail": "the.mail@ubsend.com", "phone": null, "mobile": "08764932919", "email": "the.mail@ubsend.com", "description": "" } ], "references": [ { "id": "2", "kind": "2", "kindText": null, "value": "Gate 1 2192192121 order no" } ], "packageVolume": 0.0 } ], "messages": [], "labels": [ { "base64": "base64encodedlabel", "format": "PDF", "shipmentAWB": "8078600346" } ], "shipmentId": 0, "isCreate": true, "orderNumber": "Gate 24 2192192121 order no", "sorting": "", "labelText1": "", "labelText2": "", "labelText3": "", "deliveryNumber": null, "interCompanyNumber": null, "dataSource": 101, "inputSource": 101 }, "statusCode": "200", "message": "", "warning": "", "isUbSend": false, "isUbSuite": false }
AddBookingSmart v2.0 Last modified: 2018-12-10
Summary
Adds a booking based on your subscription.
Description
It is simplified version of AddBookingBasic, where products and services are predefined in UB system based on CustomerIdentifier and receiver country.
It is important to mention, that parcel shop product is selected only when parcel shop address is included ("Kind":10
). In this case, parcel shop ID ("CustNo"
) has to be based on the carrier, which is agreed with United Broker.
URL
http://ubapimanagement.azure-api.net/bookingapistaging/v2/AddBookingSmart
http://ubapimanagement.azure-api.net/bookingapiprod/v2/AddBookingSmart
Method
POST
Headers
Content-Type: application/json
Authorization: Basic base64(username:password)
Request example
{ "CustomerIdentifier":1000001016, "OrderNo":"1000058", "Addresses":[ { "Kind":1, "Name1":"Jhon Jhonson", "Name2":"", "Attention":"", "Street1":"Spring road", "Street2":"", "PostCode":"7500", "City":"Stockholm", "State":"", "CountryCode":"SE", "Phone":"", "Mobile":"", "Email":"test@email.com" }, { "Kind":0, "Name1":"John Doe", "Name2":"", "Attention":"", "Street1":"Test address 1", "Street2":"Test address 2", "PostCode":"12346", "City":"FARSTA", "State":"Stockholm", "CountryCode":"SE", "Phone":"", "Mobile":"04799999998", "Email":"testemail1@dbschenker.se", "CustNo":"" }, { "Kind":10, "CustNo":"2924", "CountryCode":"SE" } ], "Lines":[ { "GoodsTypeId":"0", "PkgWeight":5000, "Height":200, "Length":300, "Width":30, "Packages":[ { "ItemNo":1 } ] } ], "Messages":[ { "Kind":3, "Text":"Shipped with UBsend.com" } ], "LabelType":"PDF" }
Parameters
Name | Type | Required | Description | Max length |
---|---|---|---|---|
LabelType | string |
Label content will be returned in a encoded (base64) string. | 3 | |
CustomerIdentifier | int |
Your identifier in the United Broker System. | ||
OrderNo | string |
The order number of the shipment. | ||
Addresses | array |
Sender and receiver should always be defined. | ||
Lines | array |
|||
References | array |
Extra information for the shipment | ||
Messages | array |
Extra information for the shipment |
Sender or receiver
Name | Type | Required | Description | Max length |
---|---|---|---|---|
Kind | int |
Defines the kind of the address:
|
||
Name1 | string |
The name of the person | 250 | |
Name2 | string |
Only need if not enough space in Name1 | 250 | |
Attention | string |
Defines the name of another person than the sender or receiver. | 250 | |
Street1 | string |
The address of the receiver or sender | 250 | |
Street2 | string |
Only used if not enough space in Street1 | 250 | |
PostCode | string |
The post code of the address | 10 | |
City | string |
The city name of the address | 50 | |
State | string |
The state of the address. | 50 | |
CountryCode | string |
The country of the address. Format: ISO 3166-1 alpha-2 | 2 | |
Phone | string |
The landline phone number of the receiver or sender | 20 | |
Mobile | string |
The mobile number of the receiver or sender. | 20 | |
string |
The email of the receiver or sender. | 50 |
Parcel shop
Name | Type | Required | Description | Max length |
---|---|---|---|---|
Kind | int |
Defines the kind of the address:
|
||
CustNo | string |
Id of the parcel shop in the carrier system | ||
CountryCode | string |
The country of the parcel shop. Format: ISO 3166-1 alpha-2 | 2 |
Name | Type | Required | Description | Max length |
---|---|---|---|---|
GoodsTypeId | string |
Should always be defined, and it differs from product to product. Provide default value 0 if the wanted product does not require it. | 2 | |
PkgWeight | int |
The package weight of the shipment in grams | ||
Height | double |
The height of the package in millimeters | ||
Length | double |
The length of the package in millimeters | ||
Width | double |
The width of the package in millimeters | ||
Packages | array |
Name | Type | Required | Description | Max length |
---|---|---|---|---|
ItemNo | int |
If more packages are needed for a line, provide item number different from each other. Use 1, 2, 3... |
Name | Type | Required | Description | Max length |
---|---|---|---|---|
Kind | int |
Kind of reference. Used to identify the kind of reference in the system | ||
Value | string |
The value of the reference | 250 |
Name | Type | Required | Description | Max length |
---|---|---|---|---|
Kind | int |
Kind of message. Used to identify the kind of message in the carrier or service provider system | ||
Text | string |
The value of the message | 250 |
Response
If request was successful, system will return json response with information about the booking, including encoded (base64) label.
Successfull response object will have the StatusCode of "200"
.
Unsuccessfull response object will have the StatusCode of "400"
.
Example of response with an error (validation)
"Input string '10a03475' is not a valid integer. Path 'CustomerIdentifier', line 8, position 32.\r\n"
Example of response with an error
{ "statusCode": 400, "errorMessages": [ "Flow that you are trying to use is not currently available for AddBookingSmart" ] }
Example of succesfull response
{ "statusCode": 200, "successObject": [ { "isUbsendField": false, "bookingHeader": { "pickupTerminal": null, "companyRegNumber": null, "number": "", "consigneeNumber": 1000003475, "consigneeName": "", "invoiceeNumber": 0, "invoiceeName": "", "locationID": 0, "locationName": "", "description": "", "currencyCode": "", "bookingId": 0, "providerId": 0, "lines": [ { "customerLineLength": 0.0, "customerLineWidth": 0.0, "customerLineHeight": 0.0, "customerLineVolume": 0.0, "customerLineWeight": 0.0, "customerLineVolumeWeight": 0.0, "customerLineLoadmeter": 0.0, "id": 0, "ubLineId": "0", "lineNumber": "", "shipmentDescription": "", "shipmentAWB": "06036048371", "carrierID": "1000000001", "carrierName": "GLS", "subCarrierID": "1000000008", "subCarrierName": "GLS Denmark Parcel", "purchaseProductID": "1000000031", "purchaseProductName": "", "goodsTypeKey1": 0, "goodsTypeName": "", "goodsTypeID": "0", "numberOfColli": 1, "unitType": 0, "unitTypeName": "", "length": 13.0, "width": 11.0, "height": 12.0, "weight": 12000.0, "volume": 0.0, "dimensionalWeight": 0.0, "loadmeter": 0, "shipCustomsValue": 0.0, "shipCustomsCurrency": "", "shipCODValue": 0.0, "shipCODCurrency": "", "insuranceValue": 0.0, "insuranceCurrency": "", "insuredBy": "", "dangerousGoods": false, "incoTerms": "", "sendersReference": "YO8MJPIR", "receiversReference": "", "receiversReference2": "", "bookingSystem": "", "bookingSystemShipmentID": 0.0, "bookingSystemOrderNumber": 0.0, "salesChannelSystem": "", "salesChannelSystemShipmentID": 0.0, "salesChannelSystemOrderNumber": 0.0, "shipmentDirection": "", "shipmentPaymentDirection": "", "payerAccountAtCarrier": null, "senderAccountAtCarrier": null, "isDocument": true, "isEUShipment": true, "isReturn": false, "bookingCreated": "2020-03-19T09:49:59.8305757+00:00", "labelPrintDate": "1990-01-01T00:00:00", "transmitDate": "2020-03-19T09:49:59.8308245+00:00", "requestedPickupDateStart": "2020-03-19T11:49:58.96", "requestedPickupDateEnd": "2020-03-19T10:49:59.8272355+00:00", "requestedDeliveryDateStart": "2020-03-20T09:49:59.8291238+00:00", "requestedDeliveryDateEnd": "2020-03-20T10:49:59.8268916+00:00", "brandName": "", "carrierLineWeight": 0.0, "carrierLineHeight": 0.0, "carrierLineLength": 0.0, "carrierLineWidth": 0.0, "carrierLineVolume": 0.0, "carrierLineVolumeWeight": 0.0, "carrierLineLoadmeter": 0.0, "volumeIndicator": "", "invoiceWeight": 0.0, "scanLines": [], "specifications": [], "collies": [ { "bookingLineColliCustoms": null, "customerColliVolumeWeight": 0.0, "customerColliLoadmeter": 0.0, "ubColliId": "0", "colliID": 0, "itemNumber": "1", "colliAWB": "06036048371", "colliPackagingType": "", "colliGoodsType": "", "colliDescriptionOfContents": "", "customerColliLength": 0.0, "customerColliWidth": 0.0, "customerColliHeight": 0.0, "customerColliWeight": 0.0, "customerColliVolume": 0.0, "carrierColliWeight": 0.0, "carrierColliHeight": 0.0, "carrierColliLength": 0.0, "carrierColliWidth": 0.0, "carrierColliVolume": 0.0, "carrierColliVolumeWeight": 0.0, "carrierColliLoadmeter": 0.0 } ], "addresses": [ { "addressTypeName": null, "addressType": "10000000", "addressID": 0, "companyName": "Anupa Walrond ", "name2": null, "contactName": "Anupa Walrond ", "address1": "Randersvej", "address2": null, "address3": "", "city": "Allingåbro", "zip": "8361", "country": "", "countryIATA": "DK", "attention": null, "attentionPhone": null, "attentionMobile": "+34123456789", "attentionEmail": "test@test.pl", "phone": null, "mobile": "+34123456789", "email": "test@test.pl", "description": "" }, { "addressTypeName": null, "addressType": "10000002", "addressID": 0, "companyName": "a company", "name2": "c/o GLS Denmark", "contactName": "c/o GLS Denmark", "address1": "Højager 2-4 0023 GLS", "address2": null, "address3": "", "city": "Taastrup", "zip": "0023", "country": "", "countryIATA": "DK", "attention": null, "attentionPhone": "4582388238", "attentionMobile": null, "attentionEmail": "cs@ubsend.com", "phone": "4582388238", "mobile": null, "email": "cs@ubsend.com", "description": "" } ], "references": [], "packageVolume": 0.0 } ], "messages": [], "labels": [ { "base64": "base64encodedlabel", "format": "PDF", "shipmentAWB": "06036048371" } ], "shipmentId": 0, "isCreate": true, "orderNumber": "12231", "sorting": "", "labelText1": "", "labelText2": "", "labelText3": "", "deliveryNumber": null, "interCompanyNumber": null, "dataSource": 100, "inputSource": 101 }, "statusCode": "200", "message": "", "warning": "", "isUbSend": false, "isUbSuite": false } ] }
ValidateBookingSmart v2.0 Last modified: 2018-12-11
Summary
Validates a booking based on your subscription.
Description
It is complementary method to the AddBookingSmart
method.
It is recommended to use this method before charging your customer, so you can be sure that the booking has a valid information
required for AddBookingSmart
method after the payment.
This method will not create a booking towards the carrier or other service provider.
Structure and information required is the same as for AddBookingSmart
method.
URL
http://ubapimanagement.azure-api.net/bookingapistaging/v2/ValidateBookingSmart
http://ubapimanagement.azure-api.net/bookingapiprod/v2/ValidateBookingSmart
Method
POST
Headers
Content-Type: application/json
Authorization: Basic base64(username:password)
Request example
{ "CustomerIdentifier":1000001016, "OrderNo":"10000555888", "Addresses":[ { "Kind":1, "Name1":"Jhon Jhonson", "Name2":"", "Attention":"", "Street1":"Spring road", "Street2":"", "PostCode":"7500", "City":"Stockholm", "State":"", "CountryCode":"SE", "Phone":"", "Mobile":"", "Email":"test@email.com" }, { "Kind":0, "Name1":"John Doe", "Name2":"", "Attention":"", "Street1":"Test address 1", "Street2":"Test address 2", "PostCode":"12346", "City":"FARSTA", "State":"Stockholm", "CountryCode":"SE", "Phone":"", "Mobile":"04799999998", "Email":"testemail1@dbschenker.se", "CustNo":"" }, { "Kind": 10, "CustNo": "2924", "CountryCode": "SE" } ], "Lines":[ { "GoodsTypeId": "0", "GoodsTypeKey1": "CT", "PkgWeight":"5000", "Height":"200", "Length":"300", "Width":"30", "Packages":[ { "ItemNo":1 } ] } ], "Messages":[ { "Kind":3, "Text":"Shipped with UBsend.com" } ], "LabelType":"PDF" }
Response
Successfull response object will have the StatusCode of "200"
.
Unsuccessfull response object will have the StatusCode of "4**"
or "5**"
and will contain an error message.
Example of response with an error
{ "StatusCode": 400, "ErrorMessages": { "BookingHeader": null, "StatusCode": "400", "Message": "Shipment validation failed & Invalid sender country. Sweden is the only valid sender country. (Sender - Country)", "Warning": "CreateBooking has not been saved due to errors" } }
Example of succesfull response
{ "StatusCode": 200, "SuccessObject": [ { "BookingHeader": null, "StatusCode": "200", "Message": "Validation passed, the request is OK", "Warning": null } ] }
Relabelling v2.0 Last modified: 2019-04-04
Summary
Relabels the booking, which was already received in UB systems
Description
When the booking is pre-received by UB, you cannot use AddBooking methods to create a label for such a booking.
Therefore, you need to use relabelling method in order to create new label for an existing booking in our systems.
URL
http://ubapimanagement.azure-api.net/bookingapistaging/v2/Relabelling
http://ubapimanagement.azure-api.net/bookingapiprod/v2/Relabelling
Method
POST
Headers
Content-Type: application/json
Authorization: Basic base64(username:password)
Request example
{ "shipmentAwb": "000000001", "orderNumber": "100000000" }
Parameters
Name | Type | Required | Description | Max length |
---|---|---|---|---|
shipmentAwb | string |
Shipment AWB of the parcel received in UB systems | 100 | |
orderNumber | string |
Order number of the parcel received in UB systems | 100 |
Response
If request was successful, system will return json response with information about the booking, including encoded (base64) label.
Successfull response object will have the StatusCode of "200"
.
Unsuccessfull response object will have the StatusCode of "400"
.
Example of response with an error
{ "StatusCode": 400, "ErrorMessages": [ "Wrong customer number specified" ] }
Example of succesfull response
{ "StatusCode": 200, "SuccessObject": [ { "BookingHeader": { "CompanyRegNumber": null, "Number": "", "ConsigneeNumber": 1000001016, "ConsigneeName": "", "InvoiceeNumber": 20001794823, "InvoiceeName": "", "LocationID": 0, "LocationName": "", "Description": "", "CurrencyCode": null, "BookingId": 0, "ProviderId": 1, "Lines": [ { "CustomerLineLength": 0, "CustomerLineWidth": 0, "CustomerLineHeight": 0, "CustomerLineVolume": 0, "CustomerLineWeight": 0, "CustomerLineVolumeWeight": 0, "CustomerLineLoadmeter": 0, "LineId": "", "UbLineId": 0, "LineNumber": "", "ShipmentDescription": "", "ShipmentAWB": "00370726200488032387", "CarrierID": "23", "CarrierName": "", "SubCarrierID": "53", "SubCarrierName": "", "PurchaseProductID": "296", "PurchaseProductName": "", "GoodsTypeKey1": 0, "GoodsTypeName": "", "GoodsTypeID": "", "NumberOfColli": 1, "UnitType": 10000000, "UnitTypeName": null, "Length": 0, "Width": 0, "Height": 0, "Weight": 5000, "Volume": 0, "DimensionalWeight": 5000, "Loadmeter": 0, "ShipCustomsValue": 0, "ShipCustomsCurrency": "", "ShipCODValue": 0, "ShipCODCurrency": "", "InsuranceValue": 0, "InsuranceCurrency": "", "InsuredBy": "", "DangerousGoods": false, "IncoTerms": "", "SendersReference": "", "ReceiversReference": "", "ReceiversReference2": "", "BookingSystem": "", "BookingSystemShipmentID": 0, "BookingSystemOrderNumber": 0, "SalesChannelSystem": "", "SalesChannelSystemShipmentID": 260464, "SalesChannelSystemOrderNumber": 0, "ShipmentDirection": "", "ShipmentPaymentDirection": "1", "PayerAccountAtCarrier": "1234567", "SenderAccountAtCarrier": "1234567", "IsDocument": false, "IsEUShipment": false, "IsReturn": false, "BookingCreated": "2018-12-11T11:13:09", "LabelPrintDate": "0001-01-01T00:00:00.00", "TransmitDate": "0001-01-01T00:00:00.00", "RequestedPickupDateStart": "2018-12-11T11:13:09", "RequestedPickupDateEnd": "2018-12-11T11:13:09", "RequestedDeliveryDateStart": "2018-12-11T11:13:09", "RequestedDeliveryDateEnd": "2018-12-11T11:13:09", "BrandName": null, "CarrierLineWeight": 0, "CarrierLineHeight": 0, "CarrierLineLength": 0, "CarrierLineWidth": 0, "CarrierLineVolume": 0, "CarrierLineVolumeWeight": 0, "CarrierLineLoadmeter": 0, "VolumeIndicator": "V", "InvoiceWeight": 5000, "ScanLines": [ { "RelabelledAwb": null, "ColliId": 0, "KindId": 4, "LineId": 0, "ScanDate": "2018-12-11T11:13:09", "ScanServerDate": "0001-01-01T00:00:00.00", "ScanLocation": 0, "GpsLatitude": "", "GpsLongtitude": "", "ScanSignature": "", "ScanTypeID": 4, "ScanTypeName": "", "ScanText": "Scanned", "BookingSystemStatus": "", "Origin": "", "CarrierWeight": 0, "CarrierVolume": 0, "CarrierLength": 0, "CarrierWidth": 0, "CarrierHeight": 0, "CarrierLoadmeter": 0, "CarrierColliWeight": 0, "CarrierColliVolume": 0, "CarrierColliLength": 0, "CarrierColliWidth": 0, "CarrierColliHeight": 0, "CarrierColliLoadmeter": 0, "ScanLevel": "Shipment", "ScanCode": null, "ScanLineId": 0 } ], "Specifications": [ { "SpecificationId": 0, "LineId": 0, "FeeNumber": 40020, "FeeDescription": "", "FeeDescription2": "", "Quantity": 1, "UnitType": 10000001, "CurrencyCode": null, "FeeUnitCostPriceCur": 0, "FeeLineCostDiscountAmountCur": 0, "FeeUnitCostPrice": 0, "FeeLineCostDiscountAmount": 0, "FeeUnitSalesPriceCur": 0, "FeeLineSalesDiscountAmountCur": 0, "FeeUnitSalesPrice": 0, "FeeLineSalesDiscountAmount": 0, "Creditor": "" }, { "SpecificationId": 0, "LineId": 0, "FeeNumber": 40021, "FeeDescription": "", "FeeDescription2": "", "Quantity": 1, "UnitType": 10000001, "CurrencyCode": null, "FeeUnitCostPriceCur": 0, "FeeLineCostDiscountAmountCur": 0, "FeeUnitCostPrice": 0, "FeeLineCostDiscountAmount": 0, "FeeUnitSalesPriceCur": 0, "FeeLineSalesDiscountAmountCur": 0, "FeeUnitSalesPrice": 0, "FeeLineSalesDiscountAmount": 0, "Creditor": "" } ], "Collies": [ { "BookingLineColliCustoms": null, "CustomerColliVolumeWeight": 0, "CustomerColliLoadmeter": 0, "UbColliId": 0, "ColliID": "", "ItemNumber": "1", "ColliAWB": "00370726200488032387", "ColliPackagingType": "", "ColliGoodsType": "", "ColliDescriptionOfContents": "", "CustomerColliLength": 0, "CustomerColliWidth": 0, "CustomerColliHeight": 0, "CustomerColliWeight": 5000, "CustomerColliVolume": 5000, "CarrierColliWeight": 0, "CarrierColliHeight": 0, "CarrierColliLength": 0, "CarrierColliWidth": 0, "CarrierColliVolume": 0, "CarrierColliVolumeWeight": 0, "CarrierColliLoadmeter": 0 } ], "Addresses": [ { "AddressTypeName": null, "AddressType": "10000000", "AddressID": 0, "CompanyName": "John Doe", "Name2": null, "ContactName": "", "Address1": "Test address 1", "Address2": "", "Address3": "", "City": "FARSTA", "Zip": "12346", "Country": "", "CountryIATA": "SE", "Attention": "", "AttentionPhone": "", "AttentionMobile": "", "AttentionEmail": "", "Phone": "", "Mobile": "", "Email": "", "Description": "" }, { "AddressTypeName": null, "AddressType": "10000004", "AddressID": 0, "CompanyName": "ICA TOPPEN", "Name2": null, "ContactName": "", "Address1": "KAROLINERVÄGEN 21", "Address2": "", "Address3": "", "City": "DUVED", "Zip": "83771", "Country": "", "CountryIATA": "SE", "Attention": "", "AttentionPhone": "", "AttentionMobile": "", "AttentionEmail": "", "Phone": "", "Mobile": "", "Email": "", "Description": "" }, { "AddressTypeName": null, "AddressType": "10000002", "AddressID": 0, "CompanyName": "ASOS DK C/O DB Schenker", "Name2": null, "ContactName": "", "Address1": "Kantyxegatan 22", "Address2": "", "Address3": "", "City": "MALMÖ", "Zip": "21376", "Country": "", "CountryIATA": "SE", "Attention": "", "AttentionPhone": "", "AttentionMobile": "", "AttentionEmail": "", "Phone": "", "Mobile": "", "Email": "", "Description": "" } ], "References": [], "PackageVolume": 0 } ], "Messages": null, "Labels": [ { "Base64": "{base64 of a label}", "Format": "PDF", "ShipmentAWB": "00370726200488032387" } ], "ShipmentId": 260464, "IsCreate": false, "OrderNumber": "1000058", "Sorting": null, "LabelText1": null, "LabelText2": null, "LabelText3": null, "ActorId": 6372, "OverWeight": false, "DeliveryNumber": null, "InterCompanyNumber": null }, "StatusCode": "200", "Message": null, "Warning": null } ] }