/orders
and /customers
. An application that connects to this API can perform CRUD (create, read, update, delete) operations by calling an API endpoint with the associated HTTP method (POST
, GET
, PUT
, PATCH
, or DELETE
).
For ExampleCo’s Timesheets API, you will need to configure an endpoint to create timesheet entries.
HTTP method | API endpoint | Description |
---|---|---|
POST | /timesheets/upload | Creates a new timesheet entry |
HTTP 201 Created
status code and the body containing a JSON object with a message property that describes the newly-created timesheet:
HTTP 401 Unauthorized
status code.
See the implementation inNode.js.
scope
request parameter. To learn how to configure this, see the Configure the Scopes paragraph.
For our endpoint, we will require the scope batch:upload
.
See the implementation inNode.js.
/oauth/token
API endpoint to get an access token.
To do so, we will need the following configuration values you can find in your application settings:
https://{yourTenant}/oauth/token
.POST
operation to the https://{yourDomain}/oauth/token
endpoint with a payload in the following format:
Authorization
header to our request.POST
request.