10xONE API call Authentication method

All API's documentation

https://api.10xone.com/api-docs/index.html?url=/api-docs/swagger.json



Authentication with apikey

ApiKey – Predefined key for the organization.

You can get your ApiKey in 10xONE under

Settings – My company – Org API and other settings

The ApiKey has no expiration date so keep it safe

API Auth Usage - ApiKey

Add a header parameter “ApiKey”, value “#ApiKey#” - it must be included in each API calls


OR: API Auth Usage - UserToken

You can also use UserToken – in every API call

UserToken is the result of the AuthenticateUser method after successful authentication. It has 2 hours expiration time


One sample API detailed implementation: Sales Order API detailed description

Beyond the generic swagger documentation for all API's – see above – we provide you with this description as it can help you to build all other API’s, as well

1. Sales Order create/update

Service Name

SalesOrderModuleMobileWebService

Endpoint:

POST/v1/SalesOrderModuleMobileWebService/SaveOrder

Physical endpoint for test environment:

https://app.10xone.com:9409/ISalesOrderModuleMobileBL/web/SaveOrder

Authentication:

ApiKey – Predefined key for the organization. You can gather your ApiKey in the 10xONE under the Company Settings menu point, ApiKey group or ask support@10xone.com

The ApiKey has no expiration date so keep it safe

OR

[UserToken – result of the AuthenticateUser method after successful authentication. It has 2 hours expiration time]

Usage:

Add a header parameter “ApiKey”, value “#ApiKey#”

Implementation Notes

Save (Create or Update) a sales order to 10xONE using the following rules:

– ExternalOrderId is a mandatory field. 10xONE assumes that your sales order exists in other system and it has a unique number identifier which can be provided.

– Date fields – for easier posting instead of the date fields use the “DateString” fields with that formatting:

– LineType – that is an enum, use LineTypeValue instead with 1 as value

– OrderType – that is an enum, use 1 as value (means customer order)

– Order lines – list of Order lines – you must provide the lines of the order with values, currency code, ArticleId (ID of the 10xONE product) or ProductIdExt (external product Id). The system will lookup the product in the 10xONE if a proper article not found it will use the “Default” article for the order line.

– CurrencyCode – if null or not existing in 10xONE the company’s default currency will be assumed for the sales order

Request Class Model:

Request Content Type: application/json

{

"externalOrderId": null,

"externalOrderNum": null,

"orderStatusExt": null,

"orderDate": "0001-01-01T00:00:00",

"totalCurrencyId": 0.0,

"currencyCode": null,

"discountTotal": 0.0,

"discountTax": 0.0,

"shippingTotal": 0.0,

"shippingTax": 0.0,

"total": 0.0,

"totalTax": 0.0,

"partnerId": 0.0,

"extPartnerId": null,

"customerIpAddress": null,

"customerUserAgent": null,

"customerNote": null,

"externalBillingLocation": null,

"externalShippingLocation": null,

"paymentMethodId": 0.0,

"paymentMethodCode": null,

"externalPaymentMethodText": null,

"bankTransactionId": null,

"orderDatePaid": "0001-01-01T00:00:00",

"orderDatePaidGmt": "0001-01-01T00:00:00",

"orderDateCompleted": "0001-01-01T00:00:00",

"orderDateCompletedGmt": "0001-01-01T00:00:00",

"orderDatePaidString": null,

"orderDatePaidGmtString": null,

"orderDateCompletedString": null,

"orderDateCompletedGmtString": null,

"setPaidExt": null,

"orderType": 0,

"orderLines": "[list – MSalesOrderLine]",

"shippingLocation": null,

"billingLocation": null,

"orderSourceChannelText": null,

"shippinG_METHOD_EXT_ID": null,

"ordeR_NUM": null,

"sellerPartnerId": 0.0,

"warehouseId": 0.0,

"isDataLoader": false

}

MsalesOrderDocument

{

"salesOrderId": 0.0,

"document": null,

"documentName": null,

"userToken": null

}

MSalesOrderLocation

{

"firstName": null,

"lastName": null,

"companyName": null,

"address1": null,

"address2": null,

"cityName": null,

"stateName": null,

"zipCode": null,

"countryCode": null,

"email": null,

"telephoneNumber": null

}

MSalesOrderLine

{

"externalLineItemId": null,

"productIdExt": null,

"articleId": 0.0,

"name": null,

"clcQty": 0.0,

"taxCodeId": 0.0,

"clcAmount": 0.0,

"clcVatAmount": 0.0,

"clcUnitPrice": 0.0,

"lineType": 0,

"lineTypeValue": 1

}

public enum MSalesOrderLineType

{

"Product": 1,

"Shipping": 2,

"Fee": 3

}

public enum MSalesOrderType

{

"Customer": 1,

"Supplier": 2

}

Example JSON data for request

{

"ExternalOrderId": 102,

"ExternalOrderNum": null,

"OrderStatusExt": null,

"OrderDateString": "2022-08-25",

"TotalCurrencyId": 0.0,

"CurrencyCode": null,

"DiscountTotal": 0.0,

"DiscountTax": 0.0,

"ShippingTotal": 0.0,

"ShippingTax": 0.0,

"Total": 100.0,

"TotalTax": 27.0,

"PartnerId": 0.0,

"ExtPartnerId": null,

"CustomerIpAddress": null,

"CustomerUserAgent": null,

"CustomerNote": null,

"ExternalBillingLocation": null,

"ExternalShippingLocation": null,

"PaymentMethodId": 0.0,

"PaymentMethodCode": null,

"ExternalPaymentMethodText": null,

"BankTransactionId": null,

"OrderDatePaidString": "2022-08-25T08:01:01",

"OrderDatePaidGmtString": "2022-08-25T06:02:02",

"OrderDateCompletedString": "2022-08-25T08:03:03",

"OrderDateCompletedGmtString": "2022-08-25T06:04:04",

"SetPaidExt": null,

"OrderType": 1,

"OrderLines": [

{

"ExternalLineItemId": 1,

"ProductIdExt": null,

"ArticleId": 0.0,

"Name": null,

"ClcQty": 1.0,

"TaxCodeId": 0.0,

"ClcAmount": 100.0,

"ClcVatAmount": 27.0,

"ClcUnitPrice": 100.0,

"LineTypeValue": 1

}

],

"ShippingLocation": {

"FirstName": "HAHO",

"LastName": "TEST",

"CompanyName": null,

"Address1": "Ferenc körút 1.",

"Address2": null,

"CityName": "Budapest",

"StateName": null,

"ZipCode": "1094",

"CountryCode": "HU",

"Email": "haho@haho.hu",

"TelephoneNumber": "+36205551111"

},

"BillingLocation": {

"FirstName": "HAHO",

"LastName": "TEST",

"CompanyName": null,

"Address1": "Ferenc körút 1.",

"Address2": null,

"CityName": "Budapest",

"StateName": null,

"ZipCode": "1094",

"CountryCode": "HU",

"Email": "haho@haho.hu",

"TelephoneNumber": "+36205551111"

},

"OrderSourceChannelText": null,

"SHIPPING_METHOD_EXT_ID": null,

"ORDER_NUM": null,

"SellerPartnerId": 0.0,

"WarehouseId": 0.0,

"IsDataLoader": false

}

Response Class Model

Response Content Type: application/json

{

"externalOrderId": null,

"externalOrderNum": null,

"orderStatusExt": null,

"orderDate": "0001-01-01T00:00:00",

"totalCurrencyId": 0.0,

"currencyCode": null,

"discountTotal": 0.0,

"discountTax": 0.0,

"shippingTotal": 0.0,

"shippingTax": 0.0,

"total": 0.0,

"totalTax": 0.0,

"partnerId": 0.0,

"extPartnerId": null,

"customerIpAddress": null,

"customerUserAgent": null,

"customerNote": null,

"externalBillingLocation": null,

"externalShippingLocation": null,

"paymentMethodId": 0.0,

"paymentMethodCode": null,

"externalPaymentMethodText": null,

"bankTransactionId": null,

"orderDatePaid": "0001-01-01T00:00:00",

"orderDatePaidGmt": "0001-01-01T00:00:00",

"orderDateCompleted": "0001-01-01T00:00:00",

"orderDateCompletedGmt": "0001-01-01T00:00:00",

"orderDatePaidString": null,

"orderDatePaidGmtString": null,

"orderDateCompletedString": null,

"orderDateCompletedGmtString": null,

"setPaidExt": null,

"orderType": 0,

"orderLines": "[list - MSalesOrderLine]",

"shippingLocation": null,

"billingLocation": null,

"orderSourceChannelText": null,

"shippingMethodExtId": null,

"orderNum": null,

"sellerPartnerId": 0.0,

"warehouseId": 0.0,

"isDataLoader": false

}

MsalesOrderDocument

{

"salesOrderId": 0.0,

"document": null,

"documentName": null,

"userToken": null

}

MSalesOrderLocation

{

"firstName": null,

"lastName": null,

"companyName": null,

"address1": null,

"address2": null,

"cityName": null,

"stateName": null,

"zipCode": null,

"countryCode": null,

"email": null,

"telephoneNumber": null

}

MSalesOrderLine

{

"externalLineItemId": null,

"productIdExt": null,

"articleId": 0.0,

"name": null,

"clcQty": 0.0,

"taxCodeId": 0.0,

"clcAmount": 0.0,

"clcVatAmount": 0.0,

"clcUnitPrice": 0.0,

"lineType": 0,

"lineTypeValue": 1

}

public enum MSalesOrderLineType

{

"Product": 1,

"Shipping": 2,

"Fee": 3

}

public enum MSalesOrderType

{

"Customer": 1,

"Supplier": 2

}

Example JSON data for response

{

"Item": "string",

"ErrorCode": "200",

"ExternalMessage": "OK",

{

"ExternalOrderId": 102,

"ExternalOrderNum": null,

"OrderStatusExt": null,

"OrderDateString": "2022-08-25",

"TotalCurrencyId": 0.0,

"CurrencyCode": null,

"DiscountTotal": 0.0,

"DiscountTax": 0.0,

"ShippingTotal": 0.0,

"ShippingTax": 0.0,

"Total": 100.0,

"TotalTax": 27.0,

"PartnerId": 0.0,

"ExtPartnerId": null,

"CustomerIpAddress": null,

"CustomerUserAgent": null,

"CustomerNote": null,

"ExternalBillingLocation": null,

"ExternalShippingLocation": null,

"PaymentMethodId": 0.0,

"PaymentMethodCode": null,

"ExternalPaymentMethodText": null,

"BankTransactionId": null,

"OrderDatePaidString": "2022-08-25T08:01:01",

"OrderDatePaidGmtString": "2022-08-25T06:02:02",

"OrderDateCompletedString": "2022-08-25T08:03:03",

"OrderDateCompletedGmtString": "2022-08-25T06:04:04",

"SetPaidExt": null,

"OrderType": 1,

"OrderLines": [

{

"ExternalLineItemId": 1,

"ProductIdExt": null,

"ArticleId": 0.0,

"Name": null,

"ClcQty": 1.0,

"TaxCodeId": 0.0,

"ClcAmount": 100.0,

"ClcVatAmount": 27.0,

"ClcUnitPrice": 100.0,

"LineTypeValue": 1

}

],

"ShippingLocation": {

"FirstName": "HAHO",

"LastName": "TEST",

"CompanyName": null,

"Address1": "Ferenc körút 1.",

"Address2": null,

"CityName": "Budapest",

"StateName": null,

"ZipCode": "1094",

"CountryCode": "HU",

"Email": "haho@haho.hu",

"TelephoneNumber": "+36205551111"

},

"BillingLocation": {

"FirstName": "HAHO",

"LastName": "TEST",

"CompanyName": null,

"Address1": "Ferenc körút 1.",

"Address2": null,

"CityName": "Budapest",

"StateName": null,

"ZipCode": "1094",

"CountryCode": "HU",

"Email": "haho@haho.hu",

"TelephoneNumber": "+36205551111"

},

"OrderSourceChannelText": null,

"SHIPPING_METHOD_EXT_ID": null,

"ORDER_NUM": null,

"SellerPartnerId": 0.0,

"WarehouseId": 0.0,

"IsDataLoader": false

}

}

2. Sales Order details

Service Name

SalesOrderModuleMobileWebService

Endpoint

POST/v1/SalesOrderModuleMobileWebService/GetSalesOrderDetails

Physical endpoint for test environment:

https://app.10xone.com:9409/ISalesOrderModuleMobileBL/web/GetSalesOrderDetails

Authentication

ApiKey – Predefined key for the organization. You can gather your ApiKey in the 10xONE under the Company Settings menu point, ApiKey group or ask support@10xone.com

The ApiKey has no expiration date so keep it safe.

or

[UserToken – result of the AuthenticateUser method after successful authentication. It has 2 hours expiration time]

Usage:

Add a header parameter “ApiKey”, value “#ApiKey#”

Implementation Notes

Get the SALES_ORDER detail record by ExternalOrderId or SalesOrderId (which Is the 10xONE internal database ID of the SALES_ORDER)

– SalesOrderId is an optional field. 10xONE will look up the SalesOrder by its SALES_ORDER_ID and returns the data in the same structure as the SaveOrder request in json format.

– ExternalOrderId is a mandatory field. 10xONE tries to lookup the given SalesOrder object and return the data in the same class as the SaveOrder in json format.

– Order lines are not included in the result

Request Class

Parameter content Typeapplication/json

Example request

{

“SalesOrderId”: 0,

“ExternalOrderId”: 101921

}

Response Class

I. Response Content Typeapplication/json

Example response

{

“ErrorCode”: 200,

“ErrorMessage”: “OK”,

“Item”: {

“BankTransactionId”: null,

“BillingLocation”: {

“Address1”: “Ferenc körút 1.”,

“Address2”: null,

“CityName”: “Budapest”,

“CompanyName”: null,

“CountryCode”: “HU”,

“Email”: “haho@haho.hu”,

“FirstName”: “HAHO”,

“LastName”: “TEST”,

“StateName”: null,

“TelephoneNumber”: “+36205551111”,

“ZipCode”: “1094”

},

“CurrencyCode”: null,

“CustomerIpAddress”: “”,

“CustomerNote”: “”,

“CustomerUserAgent”: “”,

“DiscountTax”: 0.000000,

“DiscountTotal”: 0.000000,

“ExtPartnerId”: null,

“ExternalBillingLocation”: “”,

“ExternalOrderId”: “101921”,

“ExternalOrderNum”: “”,

“ExternalPaymentMethodText”: “”,

“ExternalShippingLocation”: “”,

“IsDataLoader”: false,

“ORDER_NUM”: “KP-2022-000069”,

“OrderDate”: “/Date(1661407261000+0200)/”,

“OrderDateCompleted”: “/Date(1661407383000+0200)/”,

“OrderDateCompletedGmt”: null,

“OrderDateCompletedGmtString”: null,

“OrderDateCompletedString”: null,

“OrderDatePaid”: null,

“OrderDatePaidGmt”: null,

“OrderDatePaidGmtString”: null,

“OrderDatePaidString”: null,

“OrderDateString”: null,

“OrderLines”: [],

“OrderSourceChannelText”: null,

“OrderStatusExt”: “”,

“OrderType”: 1,

“PartnerId”: 337625,

“PaymentMethodCode”: null,

“PaymentMethodId”: 0,

“SHIPPING_METHOD_EXT_ID”: null,

“SalesOrderId”: 4287,

“SellerPartnerId”: 337625,

“SetPaidExt”: null,

“ShippingLocation”: {

“Address1”: “Ferenc körút 1.”,

“Address2”: null,

“CityName”: “Budapest”,

“CompanyName”: null,

“CountryCode”: “HU”,

“Email”: null,

“FirstName”: “HAHO”,

“LastName”: “TEST”,

“StateName”: null,

“TelephoneNumber”: null,

“ZipCode”: “1094”

},

“ShippingTax”: 0.000000,

“ShippingTotal”: 0.000000,

“Total”: 0.000000,

“TotalCurrencyId”: 1,

“TotalTax”: 0.000000,

“WarehouseId”: 398

}

}

3. Sales Order Shipment Status

Service Name

SalesOrderModuleMobileWebService

Endpoint

POST/v1/SalesOrderModuleMobileWebService/GetSalesShipmentStatus

Physical endpoint for test environment:

https://app.10xone.com:9409/ISalesOrderModuleMobileBL/web/GetSalesOrderShipmentStatus

Authentication

ApiKey – Predefined key for the organization. You can gather your ApiKey in the 10xONE under the Company Settings menu point, ApiKey group or ask support@10xone.com

The ApiKey has no expiration date so keep it safe.

or

[UserToken – result of the AuthenticateUser method after successful authentication. It has 2 hours expiration time]

Usage:

Add a header parameter “ApiKey”, value “#ApiKey#”


Implementation Notes

Get the SALES_ORDER Shipment status record by ExternalOrderId or SalesOrderId (which Is the 10xONE internal database ID of the SALES_ORDER)

– SalesOrderId is an optional field. 10xONE will look up the SalesOrder by its SALES_ORDER_ID

– ExternalOrderId is a mandatory field. 10xONE tries to lookup the given SalesOrder object and return the data in json format.


Request Class

Content Typeapplication/json

{

"SalesOrderId": string,

"ExternalOrderId": string

}

Response Class

II. Response Content Typeapplication/json

“ErrorCode”: “decimal”,

“ExternalMessage”: “string”,

“Item”: string

200 – OK – if no problem happen.

400 – Error message if any error happens

401 – ExternalOrderId is a mandatory field. Please provide a non-zero value in that field.

Response:

{

“ErrorCode”: 200,

“ErrorMessage”: “OK”,

“Item”: {

“completion_date”: 2022.11.29,

“delivery_status_id”: 3,

“delivery_status_text”: “Successful”,

“shipment_id”: “1234567”,

“shipment_reference”: “MXP22112954968”,

“shipping_company”: “GLS”

}

}

Example request

{

“SalesOrderId”: 0,

“ExternalOrderId”: 101921

}

Example response

I. Use case 1:

Criteria:

– Sales Order cannot be found in the 10xONE Organization

Response:

{

“ErrorCode”: 404,

“ErrorMessage”: “Sales Order not found”,

“Item”: null

}

II. Use case 2:

Criteria:

– GroupId (Deliveo) = Shipment_reference (10xONE) cannot be found in the Deliveo

Response:

{

“ErrorCode”: 200,

“ErrorMessage”: “OK”,

“Item”:

{

“completion_date”: null,

“delivery_status_id”: 1,

“delivery_status_text”: “Not forwarded”,

“shipment_id”: null,

“shipment_reference”: null,

“shipping_company”: null

}

}

III. Use case 2.1:

Criteria:

– Shipment_id (Deliveo) = Shipment_Id (10xONE) is NULL

– Dropped_off is NULL

Response:

{

“ErrorCode”: 200,

“ErrorMessage”: “OK”,

“Item”:

{

“completion_date”: null,

“delivery_status_id”: 1,

“delivery_status_text”: “Not forwarded”,

“shipment_id”: null,

“shipment_reference”: “MXP22112954968”,

“shipping_company”: “DPD”

}

}

IV. Use case 3:

Criteria:

– GroupId (Deliveo) = Shipment_reference (10xONE) is NOT NULL

– Dropped_off (Deliveo) = Completion_date (10xONE) is NULL

Response:

{

“ErrorCode”: 200,

“ErrorMessage”: “OK”,

“Item”: {

“completion_date”: null,

“delivery_status_id”: “2”,

“delivery_status_text”: “In progress”,

“shipment_id”: “1234567“,

“shipment_reference”: “MXP22112954968”,

“shipping_company”: “DPD”

}

}

V. Use case 4:

Criteria:

– Group_id exists

– UnsuccessfulId (Deliveo) is NULL

– Dropped_off (Deliveo) = Completion_date (10xONE) is NOT NULL

Response:

{

“ErrorCode”: 200,

“ErrorMessage”: “OK”,

“Item”: {

“completion_date”: 2022.11.29,

“delivery_status_id”: 3,

“delivery_status_text”: “Successful”,

“shipment_id”: “1234567”,

“shipment_reference”: “MXP22112954968”,

“shipping_company”: “GLS”

}

}

VI. Use case 5:

Criteria:

– Group_id exists

– UnsuccessfulId (Deliveo) is NOT NULL

– Dropped_off (Deliveo) = Completion_date (10xONE) is NOT NULL

Response:

{

“ErrorCode”: 200,

“ErrorMessage”: “OK”,

“Item”: {

“completion_date”: 2022.11.29,

“delivery_status_id”: 3,

“delivery_status_text”: “Unsuccessful”,

“shipment_id”: “1234567”,

“shipment_reference”: “MXP22112954968”,

“shipping_company”: “GLS”

}

}

Mapping:

Deliveo 10xONE

DeliveoPackage.group_id shipment_reference

DeliveoPackage.shipment_id shipment_id

DeliveoPackage.dropped_off completion_date

DeliveoPackage.unsuccessful_id unsuccessful_id

DeliveoPackage.subcontractor_name subcontractor_name

Status ID's:

ID TEXT

1 Not forwarded

2 In progress

3 Successful

4 Unsuccessful

Verified by MonsterInsights