HTTP endpoints
getPartnerByExternalId
GET /api/v1/partners/by-external-id/{externalId}
Requires read. Keep the Bearer key on your server.
SDK
ts
grizzlee.getPartnerByExternalId(externalId: string): Promise<Partner>HTTP
Use your backend's HTTP client. The cURL request shows the wire format. Replace path parameters and example values.
sh
curl --fail-with-body --request GET \
'https://app.grizzlee.ca/api/v1/partners/by-external-id/{externalId}' \
-H "Authorization: Bearer $GRIZZLEE_SERVER_KEY"Response
HTTP responses wrap this value in data. The SDK returns the value directly unless the note above describes a wrapper.
| Field | Type | Required | Details |
|---|---|---|---|
programIds | array | Yes | |
id | string | Yes | |
companyId | string | Yes | |
referralCode | string | Yes | |
alias | string | Yes | The partner's short code, such as KARL7Q. Unique in the company and accepted wherever referralCode is, in any case. It never changes after creation, except that erasure replaces it with the uppercase referralCode. |
active | boolean | Yes | |
createdAt | string | Yes | |
erasedAt | string | No | When the merchant erased the partner's personal data. An erased partner is named ERASED_PARTNER_NAME, has an empty email and no customer links, labels or properties. It stays inactive and its external ID cannot be registered again. |
email | string | Yes | |
name | string | Yes | |
externalId | string | Yes | |
customerIds | array | No | Merchant customer IDs belonging to this partner. Supplied lists replace the links. |
labels | array | No | |
properties | object | No | |
stripeAccountId | union | No | The partner's Stripe connected account on the merchant's Stripe platform. Scheduled payouts send Stripe transfers here when the payout schedule names a Stripe connection. Setting it needs payouts:write. Null removes it. |
locale | union | No | The partner's language: en, fr-CA, hy or ru. Emails, the embedded dashboard and the partner portal use it when the company uses it, and the company's default otherwise. Null removes it. |
properties
Type: object.
stripeAccountId
Variant 1
Type: null.
Variant 2
Type: string.
locale
Variant 1
Type: null.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
Variant 5
Type: string.
Response schema
json
{
"type": "object",
"properties": {
"programIds": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "string"
},
"companyId": {
"type": "string"
},
"referralCode": {
"type": "string"
},
"alias": {
"type": "string",
"description": "The partner's short code, such as KARL7Q. Unique in the company and accepted wherever\nreferralCode is, in any case. It never changes after creation, except that erasure replaces it\nwith the uppercase referralCode."
},
"active": {
"type": "boolean"
},
"createdAt": {
"type": "string"
},
"erasedAt": {
"type": "string",
"description": "When the merchant erased the partner's personal data. An erased partner is named\nERASED_PARTNER_NAME, has an empty email and no customer links, labels or properties. It stays\ninactive and its external ID cannot be registered again."
},
"email": {
"type": "string"
},
"name": {
"type": "string"
},
"externalId": {
"type": "string"
},
"customerIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Merchant customer IDs belonging to this partner. Supplied lists replace the links."
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"properties": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
]
}
},
"stripeAccountId": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
}
],
"description": "The partner's Stripe connected account on the merchant's Stripe platform. Scheduled payouts\nsend Stripe transfers here when the payout schedule names a Stripe connection. Setting it\nneeds payouts:write. Null removes it."
},
"locale": {
"anyOf": [
{
"type": "null"
},
{
"type": "string",
"const": "en"
},
{
"type": "string",
"const": "fr-CA"
},
{
"type": "string",
"const": "hy"
},
{
"type": "string",
"const": "ru"
}
],
"description": "The partner's language: en, fr-CA, hy or ru. Emails, the embedded dashboard and the partner\nportal use it when the company uses it, and the company's default otherwise. Null\nremoves it."
}
},
"required": [
"programIds",
"id",
"companyId",
"referralCode",
"alias",
"active",
"createdAt",
"email",
"name",
"externalId"
]
}Errors
Failures return { "error": { "code": "...", "message": "...", "details": {} } }. Details are optional. See error statuses. Reuse an unchanged event payload when retrying.