Before starting
This API requires a 2-legged authentication managed by our OAuth 2.0 authorization server. Please follow the method described here.
Subscribe to the API
You get the Authorization header credentials when you register your application on the Orange Developer Console.
API Authentication
HTTPS requests to the REST API are protected with a Basic authentication. To learn more about how Orange Developer handles authentication, please refer to our documentation.
In short, you will use your Orange Developer Authorization header as authorization_header for the Basic authentication with Orange Developper. The first step is to request an access_token:
After registering your application, you can subscribe to our service. This request must be approved by OBS Fusion API team. You will be notified by email when the subscription will be approved.
curl -X POST \
-H "Authorization: {{ authorization_header }}" \
-d "grant_type=client_credentials" \
https://api.orange.com/oauth/v2/token
In response, you will get an access_token that you must use in all OBS Fusion API requests.
{
"token_type": "Bearer",
"access_token": "66AeYJF8eJQPS22SjkFg9LB1LePC",
"expires_in": "7776000"
}
The token validity period is 90 days.
Test the service
Create a SalesOrder example
curl -X POST \
https://api.orange.com/sales-orders/qualification/v1/salesorders \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-H 'Authorization: Bearer {accessToken}' \
-d '{{salesOrderPayload}}'
salesOrderPayload example
{
"BusinessUnitName": "1865_OCEAN",
"RequestingBusinessUnitName": "1865_OCEAN",
"SourceTransactionSystem": "OPS",
"SourceTransactionId": "SDUS14",
"SourceTransactionNumber": "SDUS14",
"BuyingPartyName": "SOGETREL",
"TransactionTypeCode": "CAPEX_NO_PROJECT",
"CustomerPONumber": "TEST",
"TransactionalCurrencyCode": "EUR",
"RequestingLegalEntity": "Orange Business Services SA",
"PartialShipAllowedFlag": true,
"FreezePriceFlag": false,
"FreezeShippingChargeFlag": false,
"FreezeTaxFlag": false,
"SubmittedFlag": true,
"Salesperson": "Ahlem Yousfi",
"billToCustomer": [
{
"PartyName": "SOGETREL"
}
],
"shipToCustomer": [
{
"PartyName": "SOGETREL"
}
],
"salesCredits": [
{
"SourceTransactionSalesCreditIdentifier": "1",
"SalesCreditTypeId": "1",
"Percent": "100",
"Salesperson": "Stephane Chaussat"
}
],
"lines": [
{
"SourceTransactionLineNumber": "3",
"ProductNumber": "OCEE/FMA120",
"OrderedQuantity": "1",
"UnitSellingPrice": "122",
"RequestedShipDate": "2019-10-01",
"RequestedFulfillmentOrganizationCode": "OCE_AIX",
"PartialShipAllowedFlag": true,
"SubstitutionAllowedFlag": false,
"TransactionCategoryCode": "ORDER",
"SourceScheduleNumber": "1",
"SourceTransactionLineId": "3",
"SourceTransactionScheduleId": "1",
"OrderedUOM": "Each",
"ExtendedAmount": 122,
"manualPriceAdjustments": [
{
"AdjustmentAmount": "122",
"AdjustmentTypeCode": "PRICE_OVERRIDE",
"ReasonCode": "ORA_SALES_NEGOTIATION",
"SequenceNumber": "1",
"ChargeDefinitionCode": "QP_SALE_PRICE",
"SourceManualPriceAdjustmentId": "1",
"ChargeRollupFlag": false
}
]
}
]
}
With
- {accessToken}: your access_token
- {salesOrderPayload}: All payload fields formatted as field / object you will find them in the following link: descriptions
Error handling
Orange APIs use appropriate HTTP status codes to indicate any request processing error. See Orange Developer Common errors page for more information.
Endpoint
https://api.orange.com/sales-orders/qualification/v1