Search Documentation

Search for a documentation page...

Addons API

REST API endpoints for managing carrier addons (GLS, InPost, Furgonetka).

Addons are carrier integrations that extend checkout with features like parcel-shop pickers and shipment tracking. YNS supports three shipping addons:

  • GLS — GLS Poland (ADE-Plus WebAPI). Connectable via API.
  • InPost — InPost Paczkomat (ShipX v1). 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)

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 (without config.labelMode).


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.
curl -X PUT \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{"environment": "live", "token": "shipx_token", "orgId": "12345"}' \
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 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