Introduction
Welcome to the reference documentation for the 1WorldSync Platform API!
Available APIs
To learn more about the common use cases of 1WorldSync Platform API, check out the different API guides below.
- Business-Validations
- GDSN-Delivery
- Item-Labels
- Item-Visibilities
- Obligations
- Receivers
- Subscriptions
- Suppliers
- Synchronisations
- Tradeitems
- Transformations
- Validations
- GPC-Prediction
- Intrastat-Prediction
Quick start
Here is an example on how you can access our API in a simple way with curl. You can find advanced cases in the Howtos.
Retrieving an access token
For authenticating your API calls, you need to pass an OAuth2 access token. Make sure you have your client_id and client_secret at hand. The following snippet places the token in an environment variable $TKN:
client_id="my-client-id"
client_secret="my-client-secret"
export TKN=$(curl -s --location --request POST \
'https://eu.auth.atrify.com/auth/realms/platform-api/protocol/openid-connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id='${client_id} \
--data-urlencode 'client_secret='${client_secret} \
| jq .access_token | sed 's/"//g')
If you don't pass any scopes, your token will automatically contain all scopes that are available to your client.
Request a resource
Now you can use the token in the $TKN variable to do calls against the API endpoints. In this example against the receivers endpoint:
curl --location --request GET \
"https://eu.api.atrify.com/v1/receivers/<receiverGln>/items" \
--header "Authorization: Bearer $TKN"
For more advanced usage and detailed examples, see the Howtos and the individual API guides above.
Item Id
To be more flexible with our API we don't use the GDSN typical naming for items. The GLN is called 'supplierId' and the 'supplierItemId' is a combination of GTIN and target market (GTIN-TM). In the API we always have the naming of 'supplierId' and 'supplierItemId'.