Adding customers' purchases to Cantook Cloud.
POST /hub
POST
/hub
- In order to use the Delivery API to add a purchase whose content is hosted by Cantook Hub, a retailer must first obtain
- the identifier of a given user
- A status document url and an access token
- Calls to the Delivery API must include an “Authorization” request header, containing a secret string (that will be provided by De Marque) as a bearer token.
Authorizations
Request Body required
Input required to add a new sale hosted by Cantook Hub to Cantook Cloud.
object
user_id
required
The user identifier, as returned in the ‘sub’ claim of the OpenID Connect token.
string
status_document_url
required
URL to obtain the Status Document from.
string
access_token
required
The library bearer token.
string
test
The sale is a test
boolean
Responses
200
Bookshelf entry exists
object
identifier
required
The identifier of the bookshelf entry
string
201
Bookshelf entry created
object
identifier
required
The identifier of the created bookshelf entry
string
400
Invalid json syntax or invalid fields in the request body
object
status
required
integer
title
string
type
string
401
Authentication failed. The bearer token is missing or it’s no longer valid.
object
status
required
integer
403
Entry already exists for a different account or it has been revoked
object
status
required
integer
title
string
type
string
404
Account does not exist
object
status
required
integer
title
string
type
string
405
Bad method. Only POST is allowed on this endpoint.
object
status
required
integer
502
Trouble with the upstream server
object
status
required
integer
title
string
type
string