metafresh logo and link to homepage

Setup Authorization Token for accessing REST API

Setup Access

  1. open user window
  2. go to tab “authorization”
  3. add new record
  4. Role: specify which permissions the token should be able to use
  5. confirm
  6. token is generated and saved

Now you can use that token to access the API.


This example shows how to create a sales order using the token.


create a file test.json with your json string:

{ "shipBPartnerCode":"1000106","datePromised": "2018-08-16T00:00:00.000Z","docTypeName": "Angebot","lines": [{"productCode":"A001","qty":111}]}

run the test:

cat test.json | curl -X POST -d @- "http://app:8282/api/sales/order" -H "accept: */*" -H "Authorization: fa51643c4e2849ed8db64c70baf578dc" -H "Content-Type: application/json"   > response.log

Zur Quelldatei auf