Skip to content
トレカクラウド
Esc
↑↓navigate↵open⌘Jpreview

Create the connection

Call this first after authorization. A revoked connection becomes active again; an active one keeps its connection time.

POST/connection
Authorization
AuthorizationOAuth2 access token · headerrequired

Authorization code flow (PKCE S256 required). Send resource=https://api.toreca-cloud.com/partner/v1 with the authorization, token and refresh requests. Access tokens last 15 minutes; refresh tokens last 90 days and rotate on every refresh.

Scopes:purchase-boosts:read
or
AuthorizationOAuth2 access token · headerrequired

Authorization code flow (PKCE S256 required). Send resource=https://api.toreca-cloud.com/partner/v1 with the authorization, token and refresh requests. Access tokens last 15 minutes; refresh tokens last 90 days and rotate on every refresh.

Scopes:inventory:read
Responses
200

The connection

idstring<uuid>required
tenantobjectrequired

The connected shop

Show properties
idstring<uuid>
namestring
slugstring
userobjectrequired

The member who approved

Show properties
idstring
namestring
emailstring<email>
clientIdstringrequired
statusstringrequired
Allowed:active
connectedAtstring<date-time>required
webhookobject | null
Show properties
urlstring<uri>
createdAtstring<date-time>
cursorstringrequired

The current head of the change feed. Reading from it returns only later changes.

401

invalid_token: the token is missing, expired, or for another resource.

errorstringrequired

The error code

scopestring

With insufficient_scope, the missing scope

403

One of insufficient_scope, connection_revoked, client_disabled or forbidden.

errorstringrequired

The error code

scopestring

With insufficient_scope, the missing scope

Try it
Server
Authorization
Request
curl -X POST 'https://api.toreca-cloud.com/partner/v1/connection' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Response
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "tenant": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string",
    "slug": "string"
  },
  "user": {
    "id": "string",
    "name": "string",
    "email": "user@example.com"
  },
  "clientId": "string",
  "status": "active",
  "connectedAt": "2019-08-24T14:15:22Z",
  "webhook": {
    "url": "http://example.com",
    "createdAt": "2019-08-24T14:15:22Z"
  },
  "cursor": "string"
}