OptionalabortOptionalaccessAccess token to use as the value for the Authorization bearer token
Typically, this would be the access token that belongs to a customer.
This must be passed in when using one of the me endpoints.
If this property is not passed in, we fall back to using the client access token.
OptionalaggregateThe aggregate timeout in milliseconds (aggregate time spent across the original request and retries)
OptionalcorrelationValue to be passed in the X-Correlation-ID HTTP header
OptionaldataPlain JavaScript object containing the payload to send as JSON
This object will be converted to a JSON string and sent as the body
of a POST or DELETE request.
OptionalexternalAn optional identifier used to identify the id of an external user making the request: https://docs.commercetools.com/api/general-concepts#external-user-ids
OptionalheadersKey/value pairs representing the HTTP headers to send
You can pass in any headers you like using this property, however this is generally not necessary, as the {@see CommercetoolsApi.request} method applies all necessary headers.
You should specifically avoid setting values for the following headers:
AuthorizationContent-TypeX-Correlation-IDUser-AgentAll of the above are set by the CommercetoolsApi class.
Example value:
{
...
headers: {
'X-My-Special-Header': 'MyCustomValue'
}
...
}
HTTP method to use when sending the request
OptionalparamsQuerystring parameters to send with the request
Key/value pairs that are then converted in to a querystring
using the qs npm package. See the paramSerializer option
in {@see CommercetoolsApi.createAxiosInstance} for
implementation details.
Path of the REST endpoint
This is the absolute path, without the host/schema/port etc. You should not include your project key, as this will be automatically prepended.
Example: /product-projections
Note that if you want to create a path that takes into account the store key that you defined in {@see CommercetoolsApiConfig} then you should use the {@see CommercetoolsApi.applyStore} method.
OptionalretryRequest retry configuration
The request retry configuration can be set on the CommercetoolsApi
instance or on a request by request basis. If no value is passed in
here, we fall back to using the configuration provided when constructing
the CommercetoolsApi instance. If no value was passed in to the
constructor configuration, then no retries will take place.
OptionaltimeoutThe request timeout in milliseconds
An optional AbortController that can be used to abort the request