API ReferenceEndpointsSync

Sync

Deprecated sync stubs. Shopify and WooCommerce are not sync targets, and Brainerce does not sync coupons or metafields to other platforms. The endpoints on this page are kept only so existing integrations keep working: the generic sync trigger answers 501, the metafield-conflict list is always empty and its resolve and ignore routes answer 404. To make a resource available on one of your own storefronts, use the per-resource publish-sales-channel endpoints.

Get pending metafield conflicts

Deprecated. Always returns an empty array: metafields are not synced from other platforms, so no conflict is ever created.

GET
/v1/metafield-conflicts
AuthorizationBearer <token>

Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.

In: header

curl -X GET "https://api.brainerce.com/api/v1/metafield-conflicts"
[
  {
    "id": "clx1a2b3c4d5e6f7g8h9",
    "storeId": "clx1a2b3c4d5e6f7g8h9",
    "productId": "clx1a2b3c4d5e6f7g8h9",
    "metafieldDefinitionId": "clx1a2b3c4d5e6f7g8h9",
    "sourcePlatform": "SHOPIFY",
    "sourceValue": "Cotton",
    "currentValue": "Organic cotton",
    "status": "PENDING",
    "resolution": "KEEP_EXISTING",
    "resolvedAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "product": {
      "id": "clx1a2b3c4d5e6f7g8h9",
      "name": "Classic T-Shirt",
      "sku": "TSHIRT-BLK-M"
    },
    "definition": {
      "id": "clx1a2b3c4d5e6f7g8h9",
      "name": "Material",
      "key": "material",
      "type": "TEXT"
    }
  }
]

{
  "statusCode": 401,
  "code": "UNAUTHORIZED",
  "message": "Invalid or expired credential",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/metafield-conflicts"
}

{
  "statusCode": 403,
  "code": "INSUFFICIENT_SCOPE",
  "message": "API key does not have the required scope: products:write",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/metafield-conflicts"
}

{
  "statusCode": 429,
  "code": "RATE_LIMITED",
  "message": "Too many requests",
  "details": {
    "retryAfterSeconds": 12
  },
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/store"
}

Resolve a metafield conflict

Deprecated. No metafield conflict is ever created, so every id answers 404. Supports Idempotency-Key header for safe retries.

POST
/v1/metafield-conflicts/{conflictId}/resolve
AuthorizationBearer <token>

Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.

In: header

Path Parameters

conflictIdstring

Conflict ID

Header Parameters

Idempotency-Key?string

Client-supplied key (a UUID v4 is the recommended form, max 255 characters) that makes this mutation safe to retry.

  • Replay window: 24 hours. The first response for a key is cached; a retry inside the window with the same request body returns the original status and body without re-running the handler.
  • Reusing a key with a different body returns 409 Conflict with code: "IDEMPOTENCY_KEY_REUSED". The request fingerprint (method + path + body hash) is compared against the stored one; a mismatch is refused rather than served the old response.
  • Keys are scoped to the calling credential and store — two API keys may safely use the same key value.
  • Error responses are cached too, so a retry of a request that failed validation returns the same 400 immediately.
  • Sending this header on a GET returns 400 with code: "IDEMPOTENCY_KEY_NOT_SUPPORTED" — GETs are already idempotent.
  • Support is per-route and this parameter is the authoritative signal: a key sent to a route that does not declare it is accepted and silently ignored.

See /docs/api/idempotency.

Lengthlength <= 255
resolutionstring

How to resolve the conflict. Deprecated: metafield conflicts no longer exist, so every conflict ID answers 404 whatever the value.

Value in"KEEP_EXISTING" | "USE_INCOMING" | "MERGE"
curl -X POST "https://api.brainerce.com/api/v1/metafield-conflicts/string/resolve" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "resolution": "KEEP_EXISTING"  }'
{
  "id": "clx1a2b3c4d5e6f7g8h9",
  "storeId": "clx1a2b3c4d5e6f7g8h9",
  "productId": "clx1a2b3c4d5e6f7g8h9",
  "metafieldDefinitionId": "clx1a2b3c4d5e6f7g8h9",
  "sourcePlatform": "SHOPIFY",
  "sourceValue": "Cotton",
  "currentValue": "Organic cotton",
  "status": "PENDING",
  "resolution": "KEEP_EXISTING",
  "resolvedAt": "2019-08-24T14:15:22Z",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "product": {
    "id": "clx1a2b3c4d5e6f7g8h9",
    "name": "Classic T-Shirt",
    "sku": "TSHIRT-BLK-M"
  },
  "definition": {
    "id": "clx1a2b3c4d5e6f7g8h9",
    "name": "Material",
    "key": "material",
    "type": "TEXT"
  }
}

{
  "statusCode": 400,
  "code": "VALIDATION_FAILED",
  "message": "name should not be empty, price must be a positive number",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/metafield-conflicts/{conflictId}/resolve"
}

{
  "statusCode": 401,
  "code": "UNAUTHORIZED",
  "message": "Invalid or expired credential",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/metafield-conflicts/{conflictId}/resolve"
}

{
  "statusCode": 403,
  "code": "INSUFFICIENT_SCOPE",
  "message": "API key does not have the required scope: products:write",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/metafield-conflicts/{conflictId}/resolve"
}

{
  "statusCode": 404,
  "code": "RESOURCE_NOT_FOUND",
  "message": "Resource not found",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/metafield-conflicts/{conflictId}/resolve"
}

{
  "statusCode": 429,
  "code": "RATE_LIMITED",
  "message": "Too many requests",
  "details": {
    "retryAfterSeconds": 12
  },
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/store"
}

Ignore a metafield conflict

Deprecated. No metafield conflict is ever created, so every id answers 404. Supports Idempotency-Key header for safe retries.

POST
/v1/metafield-conflicts/{conflictId}/ignore
AuthorizationBearer <token>

Admin API key (server-to-server). Issue via the dashboard at Settings → API keys. Plain-text key is shown once — store in a secret manager. Format: Authorization: Bearer brainerce_xxxxxxxxx.

In: header

Path Parameters

conflictIdstring

Conflict ID

Header Parameters

Idempotency-Key?string

Client-supplied key (a UUID v4 is the recommended form, max 255 characters) that makes this mutation safe to retry.

  • Replay window: 24 hours. The first response for a key is cached; a retry inside the window with the same request body returns the original status and body without re-running the handler.
  • Reusing a key with a different body returns 409 Conflict with code: "IDEMPOTENCY_KEY_REUSED". The request fingerprint (method + path + body hash) is compared against the stored one; a mismatch is refused rather than served the old response.
  • Keys are scoped to the calling credential and store — two API keys may safely use the same key value.
  • Error responses are cached too, so a retry of a request that failed validation returns the same 400 immediately.
  • Sending this header on a GET returns 400 with code: "IDEMPOTENCY_KEY_NOT_SUPPORTED" — GETs are already idempotent.
  • Support is per-route and this parameter is the authoritative signal: a key sent to a route that does not declare it is accepted and silently ignored.

See /docs/api/idempotency.

Lengthlength <= 255
curl -X POST "https://api.brainerce.com/api/v1/metafield-conflicts/string/ignore" \  -H "Idempotency-Key: string"
{
  "id": "clx1a2b3c4d5e6f7g8h9",
  "storeId": "clx1a2b3c4d5e6f7g8h9",
  "productId": "clx1a2b3c4d5e6f7g8h9",
  "metafieldDefinitionId": "clx1a2b3c4d5e6f7g8h9",
  "sourcePlatform": "SHOPIFY",
  "sourceValue": "Cotton",
  "currentValue": "Organic cotton",
  "status": "PENDING",
  "resolution": "KEEP_EXISTING",
  "resolvedAt": "2019-08-24T14:15:22Z",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

{
  "statusCode": 401,
  "code": "UNAUTHORIZED",
  "message": "Invalid or expired credential",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/metafield-conflicts/{conflictId}/ignore"
}

{
  "statusCode": 403,
  "code": "INSUFFICIENT_SCOPE",
  "message": "API key does not have the required scope: products:write",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/metafield-conflicts/{conflictId}/ignore"
}

{
  "statusCode": 404,
  "code": "RESOURCE_NOT_FOUND",
  "message": "Resource not found",
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/metafield-conflicts/{conflictId}/ignore"
}

{
  "statusCode": 429,
  "code": "RATE_LIMITED",
  "message": "Too many requests",
  "details": {
    "retryAfterSeconds": 12
  },
  "timestamp": "2026-08-23T10:15:00.000Z",
  "path": "/api/v1/store"
}