Anatomy of a Request
All REST API requests require:
- a METHOD (GET, POST, PATCH/PUT, DELETE)
- an ENDPOINT (https://{host}/{endpoint}...?access_token=...) - the location within an API URL structure that encompasses the objects or entities that can be
manipulated by identified actions available at that location - POST / PATCH / PUT may require raw JSON content dependent upon intended action (samples are provided throughout the documentation when raw JSON content is commonly required)
- an access_token, an active session identifier that the API utilizes to validate security access to the configured account(s)
GET Request Format
- METHOD = GET (generally used to obtain, query existing records from a system)
- an ENDPOINT (https://{host}/{endpoint}...?access_token=...)
POST / PATCH / PUT Request Format
- METHOD = POST / PATCH / PUT (generally used to create new, or add to/update, existing records within a system)
- an ENDPOINT (https://{host}/{endpoint}...?access_token=...)
- Content-Type: "application/json"
- POST Authorization Request has uses "application/x-www-form-urlencoded" for Content-Type
- There are some other requests/endpoints that utilize other Content-Type values. Request-specific formats exist on example pages throughout this site.
- RequestBody: ensure JSON for the request is placed here
- For Specific Languages (e.g. Python): the body must be delivered as a JSON file, rather than a pure dictionary
- For Specific Languages (e.g. Python): the body must be delivered as a JSON file, rather than a pure dictionary
DELETE Request Format
- METHOD = DELETE (generally used to remove a record from a system)
- an ENDPOINT (https://{host}/{endpoint}...?access_token=...)