Search Documentation

Search for a documentation page...

Addons API

REST API endpoints for managing carrier addons (GLS, InPost, FedEx, Furgonetka) and tracking addons (Google Tag Manager, Meta Pixel, TikTok Pixel).

Addons are carrier integrations that extend checkout with features like parcel-shop pickers and shipment tracking. These shipping addons are managed through the API:

  • GLS – GLS Poland (ADE-Plus WebAPI). Connectable via API.
  • InPost – InPost Paczkomat (ShipX v1). Connectable via API.
  • FedEx – FedEx REST APIs (courier labels within Poland). Connectable via API.
  • Furgonetka – Multi-carrier broker. Connects via OAuth in the admin panel only; the API can read status and disconnect it.

Once connected, link a carrier to a shipping method by passing addonName when creating or updating a Shipping Method.

List Addons

GET /api/v1/addons

Returns all connected addons plus any API-managed shipping addons that are not yet connected (so you can discover what to enable).

Query Parameters

ParameterTypeDescription
typestringFilter by addon category: shipping, analytics, products, invoicing, or orders

Response

{
"data": [
{
"name": "gls",
"type": "shipping",
"connected": true,
"manageable": true,
"environments": {
"live": { "configured": true },
"test": { "configured": false }
},
"config": {
"labelMode": "one_label_on_a4_pdf"
},
"createdAt": "2024-08-01T12:00:00.000Z",
"updatedAt": "2024-08-01T12:00:00.000Z"
},
{
"name": "inpost",
"type": "shipping",
"connected": false,
"manageable": true,
"environments": null,
"config": null,
"createdAt": null,
"updatedAt": null
},
{
"name": "furgonetka",
"type": "shipping",
"connected": false,
"manageable": false,
"environments": null,
"config": null,
"createdAt": null,
"updatedAt": null
}
],
"meta": { "count": 3 }
}

Response Fields

FieldTypeDescription
namestringAddon identifier (gls, inpost, furgonetka)
typestringAddon category (currently always shipping)
connectedbooleanWhether the addon has been configured for this store
manageablebooleanWhether the API can connect/disconnect this addon (false for Furgonetka – OAuth only)
environmentsobject | nullPer-environment status (live/test), each with configured: boolean
configobject | nullAddon-specific configuration. GLS returns { labelMode }, InPost returns { fallbackTemplate }.

Get GLS Addon

GET /api/v1/addons/gls

Returns the GLS addon status for the authenticated store.

Response

{
"name": "gls",
"type": "shipping",
"connected": true,
"manageable": true,
"environments": {
"live": { "configured": true },
"test": { "configured": false }
},
"config": {
"labelMode": "one_label_on_a4_pdf"
},
"createdAt": "2024-08-01T12:00:00.000Z",
"updatedAt": "2024-08-01T12:00:00.000Z"
}

Connect GLS Addon

PUT /api/v1/addons/gls

Saves GLS ADE WebAPI credentials for the specified environment. Credentials are verified against the GLS API before being stored.

Request Body

FieldTypeRequiredDescription
environment"live" | "test"YesWhich store environment these credentials are for
loginstringYesGLS ADE WebAPI login (a dedicated API login, not the ADE panel login)
passwordstringYesGLS ADE WebAPI password. Write-only – never returned by the API.
trackApiUserstringNoTrack & Trace API user (a separate GLS-issued pair). Omit to disable status polling.
trackApiPasswordstringNoTrack & Trace API password
labelModestringNoStore-wide label format. See Label Modes.

GLS Label Modes

ValueDescription
one_label_on_a4_pdfSingle label on an A4 PDF
four_labels_on_a4_pdfFour labels on an A4 PDF
four_labels_on_a4_right_pdfFour labels on the right side of an A4 PDF
roll_160x100_pdf160x100mm roll label (PDF)
roll_160x100_zebra160x100mm roll label (Zebra ZPL)
roll_160x100_zebra_epl160x100mm roll label (Zebra EPL)
roll_160x100_datamax160x100mm roll label (Datamax DPL)
curl -X PUT \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{"environment": "live", "login": "my_api_login", "password": "my_api_pass"}' \
https://your-store.yns.store/api/v1/addons/gls

Response (200)

Returns the updated addon status (same shape as Get GLS Addon).

Error Responses

StatusDescription
400Invalid request data or GLS rejected the credentials
502GLS ADE could not verify the credentials – try again shortly

Disconnect GLS Addon

DELETE /api/v1/addons/gls

Disconnects GLS entirely, or clears credentials for a single environment.

Query Parameters

ParameterTypeDescription
environment"live" | "test"Clear only this environment's credentials (keeps the addon connected). Omit to disconnect entirely.
# Disconnect entirely
curl -X DELETE \
-H "Authorization: Bearer your_api_key" \
https://your-store.yns.store/api/v1/addons/gls

# Clear only test credentials
curl -X DELETE \
-H "Authorization: Bearer your_api_key" \
"https://your-store.yns.store/api/v1/addons/gls?environment=test"

Response (200)

{
"ok": true,
"deleted": 1
}

Error Responses

StatusDescription
404GLS is not connected to this store
409Cannot disconnect because shipping methods still use it. Delete or unlink those shipping methods first.

Get InPost Addon

GET /api/v1/addons/inpost

Returns the InPost addon status for the authenticated store. Same response shape as GLS, with config.fallbackTemplate instead of config.labelMode.

Response

{
"name": "inpost",
"type": "shipping",
"connected": true,
"manageable": true,
"environments": {
"live": { "configured": true },
"test": { "configured": false }
},
"config": {
"fallbackTemplate": "medium"
},
"createdAt": "2024-08-01T12:00:00.000Z",
"updatedAt": "2024-08-01T12:00:00.000Z"
}

Connect InPost Addon

PUT /api/v1/addons/inpost

Saves InPost ShipX credentials for the specified environment. Credentials are verified against the ShipX API before being stored.

Request Body

FieldTypeRequiredDescription
environment"live" | "test"YesWhich store environment these credentials are for
tokenstringYesShipX API token from the InPost Parcel Manager API tab. Write-only.
orgIdstringYesInPost organization ID from the Parcel Manager
geowidgetTokenstringNoGeowidget token for the checkout map tab. Omitting or blanking this clears a stored token – resend it on every update.
fallbackTemplatestringNoStore-wide fallback parcel size: small, medium, or large. Used when creating a shipment without an explicit template and product dimensions can't determine one. Environment-independent.
curl -X PUT \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{"environment": "live", "token": "shipx_token", "orgId": "12345", "fallbackTemplate": "medium"}' \
https://your-store.yns.store/api/v1/addons/inpost

Response (200)

Returns the updated addon status.

Error Responses

StatusDescription
400Invalid request data or InPost rejected the credentials
502ShipX could not verify the credentials – try again shortly

Disconnect InPost Addon

DELETE /api/v1/addons/inpost

Same behavior as Disconnect GLS Addon – supports the environment query parameter.


Get FedEx Addon

GET /api/v1/addons/fedex

Returns the FedEx addon status: which environments are connected and the store-wide settings. The API key, secret key and account number are write-only and never returned.

Response

{
"name": "fedex",
"type": "shipping",
"connected": true,
"manageable": true,
"environments": { "live": true, "test": false },
"config": {
"defaultPickupAddressId": "0199f0aa-0000-7000-8000-00000000d001",
"labelFormat": "label_pdf",
"trackingEnabled": false,
"customs": { "description": null, "hsCode": null, "origin": null, "dutiesPayer": null }
},
"createdAt": "2026-10-21T12:00:00.000Z",
"updatedAt": "2026-10-21T12:00:00.000Z"
}

Connect FedEx Addon

PUT /api/v1/addons/fedex

Saves the keys of a project on the FedEx Developer Portal for one environment. The API key and secret key are checked with FedEx (an access token request) before they are stored; the account number is checked on the first label.

Request Body

FieldTypeRequiredDescription
environment"live" | "test"Yeslive takes a production project's keys, test a sandbox project's keys
apiKeystringYesThe project's API key
secretKeystringYesThe project's secret key. Write-only.
accountNumberstringYesFedEx account number the shipments are billed to (digits only)
defaultPickupAddressIdstringNoId of the store pickup address shipments are sent from (Pickup Locations). Checked before anything is saved. Environment-independent.
labelFormatstringNoStore-wide label format: label_pdf (10×15 cm PDF, default), label_zpl (Zebra) or letter_pdf (top half of a Letter page). Environment-independent.
trackingEnabledbooleanNoUpdate live orders from FedEx's tracking every 30 minutes (off by default). FedEx may charge your FedEx account for tracking. Environment-independent.
customsobjectNoDefaults for parcels leaving Poland: description (English), hsCode (4–10 digits), origin (2-letter country of manufacture; null = the pickup address's country) and dutiesPayer (recipient, the default, or sender). Replaced whole. Environment-independent.
curl -X PUT \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{"environment": "live", "apiKey": "l7…", "secretKey": "…", "accountNumber": "123456789", "defaultPickupAddressId": "0199f0aa-0000-7000-8000-00000000d001"}' \
https://your-store.yns.store/api/v1/addons/fedex

Error Responses

StatusDescription
400Invalid request data, an unknown pickup address, or FedEx rejected the keys (details.fieldErrors)
502FedEx could not verify the keys – try again shortly

FedEx delivery methods need the FedEx service their labels are sent with: create them with addonName: "fedex" and addonData: { "carrier": "fedex", "name": "…", "service": "fedex", "serviceType": "FEDEX_PRIORITY" }. Within Poland FedEx offers FEDEX_PRIORITY, FEDEX_PRIORITY_EXPRESS and FEDEX_FIRST, depending on the account.

To price a FedEx delivery method from FedEx at checkout, add liveRate: { "enabled": true, "markupPercent": 10, "markupFixed": "500" } to its addonData. Carts in PLN then pay what FedEx charges your account for the parcel and the buyer's address (net), plus markupPercent (percent) and markupFixed (net, in grosze, as a string). The method's price stays the fallback when FedEx doesn't answer, and the price for carts in other currencies. With liveRate on, serviceType: "CHEAPEST" uses the cheapest service FedEx offers for the address, and the order keeps the service it was priced with.


Disconnect FedEx Addon

DELETE /api/v1/addons/fedex

Same behavior as Disconnect GLS Addon – supports the environment query parameter.


Get Furgonetka Addon

GET /api/v1/addons/furgonetka

Returns the Furgonetka addon status. Furgonetka connects via OAuth in the admin panel, so the API can only read its status.


Connect Furgonetka Addon

PUT /api/v1/addons/furgonetka

Returns 400 – Furgonetka connects via OAuth and cannot be enabled with an API key. Connect it in the admin: Add-ons > Furgonetka. Once connected, you can list its status, link shipping methods to it, and disconnect it via the API.


Disconnect Furgonetka Addon

DELETE /api/v1/addons/furgonetka

Disconnects the Furgonetka OAuth integration from the store.

Response (200)

{
"ok": true,
"deleted": 1
}

Error Responses

StatusDescription
404Furgonetka is not connected to this store
409Cannot disconnect because shipping methods still use it

Tracking Addons

Google Tag Manager, Meta Pixel and TikTok Pixel put tracking on the storefront without touching its code. Published storefronts pick up a change within about ten minutes, with no republish.

AddonPathname in the addon list
Google Tag Manager/api/v1/addons/gtmgtm
Meta Pixel/api/v1/addons/meta-pixelmetaPixel
TikTok Pixel/api/v1/addons/tiktok-pixeltiktokPixel

Each path supports GET (status), PUT (connect or update) and DELETE (disconnect, 404 when not connected). Reading needs the settings:read scope, writing settings:write.

Connect Google Tag Manager

PUT /api/v1/addons/gtm
FieldTypeRequiredDescription
tagIdstringYesA Tag Manager container id (GTM-XXXXXXX) or a Google tag id (G-XXXXXXXXXX for Google Analytics 4, AW-… for Google Ads)
serverSideEnabledbooleanNoLoad the tag through the store's own domain. Omit to keep the stored value (off by default).
curl -X PUT \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{"tagId": "G-ABC123XYZ"}' \
https://your-store.yns.store/api/v1/addons/gtm
{
"name": "gtm",
"type": "analytics",
"connected": true,
"manageable": true,
"environments": null,
"config": { "tagId": "G-ABC123XYZ", "serverSideEnabled": false },
"createdAt": "2026-11-05T10:00:00.000Z",
"updatedAt": "2026-11-05T10:00:00.000Z"
}

Connect Meta Pixel or TikTok Pixel

PUT /api/v1/addons/meta-pixel
PUT /api/v1/addons/tiktok-pixel
FieldTypeRequiredDescription
pixelIdstringYesMeta: the numeric Pixel (dataset) ID. TikTok: the Pixel ID from TikTok Events Manager.
accessTokenstring | nullNoConversions API (Meta) or Events API (TikTok) token. When set, the same events are also sent server-side. Omit to keep the stored token, null to remove it.
testEventCodestring | nullNoSends server events to the Test events tab while you check the setup. Omit to keep it, null to remove it.

The token is write-only. Responses report only whether one is stored:

{
"name": "metaPixel",
"type": "analytics",
"connected": true,
"manageable": true,
"environments": null,
"config": { "pixelId": "135544340232882", "accessTokenSet": true, "testEventCode": null },
"createdAt": "2026-11-05T10:00:00.000Z",
"updatedAt": "2026-11-05T10:00:00.000Z"
}

Error Responses

StatusDescription
400The tag or pixel id is not in the platform's format
404DELETE on an addon that is not connected

InstaView Account Images

GET /api/v1/instaview/accounts/:handle/images

Returns the Instagram images mirrored into YNS for a connected InstaView account, newest first. The handle is matched case-insensitively and a leading @ is ignored.

Query Parameters

ParameterTypeDefaultDescription
limitnumber48Images per page (max 96)
cursorstring–Cursor from the previous response's nextCursor
curl \
-H "Authorization: Bearer your_api_key" \
"https://your-store.yns.store/api/v1/instaview/accounts/acmecandles/images?limit=24"

Response

{
"handle": "acmecandles",
"images": [
{
"id": "0191abc0-1234-7def-8000-00000000000c",
"url": "https://cdn.example.com/instaview/acme/abc123.jpg",
"description": "New winter collection just landed",
"takenAt": "2024-05-04T09:12:00.000Z",
"code": "C6xYzAbCdEf",
"mediaId": "17912345678901234"
}
],
"nextCursor": "eyJpZCI6IjAxOTFhYmMwIn0"
}

Pass nextCursor back as cursor to fetch the next page. A null nextCursor means you've reached the end.

Errors

StatusMeaning
404No InstaView account matches the handle