Skip to content

Create shop and AppAuth

Endpoint: /go/packageOpenApiWeb/OpenApiV2/OpenApiCreateUserAndShopV2

Section titled “Endpoint: /go/packageOpenApiWeb/OpenApiV2/OpenApiCreateUserAndShopV2”

This is a customized endpoint for special integration scenarios, not a general merchant-onboarding endpoint. It lets an e-commerce SaaS platform create Xcotton users and shops. Only preconfigured platform apps (appType==1) may call it; confirm permissions and field conventions with Support before integration.

Xcotton provides a platform-specific app for obtaining a token. That token can call only this endpoint; it is not a shop token and cannot call merchant endpoints for coverage, shipment, or cancellation.

Both Authorization: Bearer {platform-token} and Signature are required headers; see Authentication. This endpoint does not read a shop-level signature switch, so Signature is always required. Compute it with the signing key already configured for the platform SaaS app.

After the shop is created, it has its own app. Obtain a shop-scoped token for merchant endpoints such as coverage, shipment, and cancellation.

See API reference · OpenApiCreateUserAndShopV2 for the complete schema.

Notes:

  • The response data type is CreateShopRespDataV2: appId, secret, uid, shopId, and authId.
  • sellerDomain is optional and can be derived from domain when omitted.
  • Request-body signKey is the signing key for the new shop’s later merchant OpenAPI calls. It is different from the platform-app key used to calculate this request’s Signature header. signKey may be omitted or sent as an empty string; the server generates and stores one when it is empty.
{
"shopName": "testshop-2025072103",
"email": "onboarding@example.com",
"domain": "https://shop.example.com",
"platForm": "PlatFormUeeShop",
"signKey": ""
}
{
"errCode": 0,
"errMsg": "success",
"data": {
"appId": 1000199,
"secret": "example-app-secret",
"uid": 177249120,
"shopId": 116816,
"authId": 22296
}
}