Skip to main content

Karla API (1.0.0)

Download OpenAPI specification:Download

The Karla API (version 1) provides programmatic access to the Karla platform. The API is organized around RESTful HTTP endpoints.

Getting started

To get started with the Karla API, you'll need to:

  1. Register an organization and shop - Sign up for a Karla account, create or join an organization and set up your first shop. Remember your shop slug, it will be required in all API URIs.
  2. Obtain API credentials - Generate an API key in the Settings section.
  3. Set up authentication - Use HTTP Basic Auth with your API credentials.
  4. Make your first request - Test the connection with a simple API call.
  5. Explore the endpoints - Use this documentation to understand available operations.

Quick Start Example

Here's a simple example to verify your API access:

curl https://api.gokarla.io/v1/shops/your-shop-slug \
  -u your-username:your-private-api-key

Base URL

All API requests should be made to:

https://api.gokarla.io/v1/

Request Format

  • Content-Type: application/json
  • Accept: application/json
  • Encoding: UTF-8

Response Format

All responses are returned in JSON format. Successful responses will have HTTP status codes in the 2xx range.

{
  "data": "...",
  "metadata": "..."
}

Authentication

The Karla API uses HTTP Basic Authentication to secure endpoints. Your username is the one you assigned to the API key (if not given, it defaults to the shop slug), and your password is the generated API key.

How It Works

HTTP Basic Authentication requires you to send credentials in the Authorization header with each request:

Authorization: Basic <base64-encoded-credentials>

Creating the Authorization Header

  1. Combine your credentials: Join your username and API key with a colon

    username:api-key
    
  2. Base64 encode: Convert the combined string to Base64

    // JavaScript example
    const credentials = btoa("your-username:your-api-key");
    const authHeader = `Basic ${credentials}`;
    
    # Python example
    import base64
    credentials = base64.b64encode(b'your-username:your-api-key').decode('utf-8')
    auth_header = f'Basic {credentials}'
    
  3. Include in requests: Add the header to your API calls

    // JavaScript/Fetch example
    fetch("https://api.gokarla.io/v1/shops/your-shop-slug", {
      headers: {
        Authorization: `Basic ${credentials}`,
        "Content-Type": "application/json",
      },
    });
    
    # Python/Requests example
    import requests
    response = requests.get(
      'https://api.gokarla.io/v1/shops/your-shop-slug',
      auth=('your-username', 'your-api-key')
    )
    

Using cURL

With cURL, you can use the -u flag which automatically handles the Base64 encoding:

curl https://api.gokarla.io/v1/shops/your-shop-slug \
  -u your-username:your-api-key

API Key Permissions

API keys can have different permission levels that control access to resources:

Role Description Access Level
viewer Read-only access to resources Can view orders, shipments, and data
editor Read and write access to most resources Can create/update orders and shipments
admin Full access to all shop resources Can manage all shop settings and data

Obtaining API Keys

  1. Log in to your Karla Dashboard
  2. Navigate to SettingsAPI Keys
  3. Select the appropriate permission level for your use case
  4. Click Create API Key
  5. Copy and securely store your credentials:
    • Username: Your merchant identifier
    • API Key: Your secret key (shown only once!)

Error Responses

Authentication errors return specific error codes:

Status Code Error Key Description
400 invalid_merchant_or_key Missing or malformed authentication credentials
401 invalid_merchant_or_key Invalid username or API key
403 insufficient_rights Valid credentials but insufficient permissions

Security Best Practices

  1. Store credentials securely

    • Use environment variables or secure key management systems
    • Never hardcode credentials in your source code
    • Never expose credentials in client-side applications
  2. Implement proper error handling

    • Handle authentication failures gracefully
    • Don't expose credential details in error messages
    • Implement retry logic with exponential backoff
  3. Maintain credential hygiene

    • Use HTTPS for all API requests (HTTP redirects automatically)
    • Rotate API keys regularly
    • Revoke unused or compromised keys immediately
    • Use the minimum required permission level

Errors

The Karla API uses conventional HTTP response codes to indicate the success or failure of an API request. In general:

  • Codes in the 2xx range indicate success
  • Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, an order doesn't exist, etc.)
  • Codes in the 5xx range indicate an error with Karla's servers

Error Response Format

All error responses follow a consistent structure:

{
  "key": "shop_not_found",
  "message": "Unable to find shop",
  "type": "invalid_request_error",
  "errors": []
}

Error Object Properties

Property Type Description
key string A unique error code identifying the specific error. See below for all possible values.
message string A human-readable message providing more details about the error.
type string The type of error returned. Either api_error or invalid_request_error.
errors array For validation errors (422), contains detailed field-level error information.

Possible Error Keys

The API returns specific error keys that help identify the exact issue:

Client Errors (4xx)

Error Key Description HTTP Status
a_b_test_not_found The requested A/B test was not found 404
a_b_test_overlap An A/B test with the same segment and time period already exists 409
announcement_exists An announcement with that ID already exists 409
announcement_not_found The requested announcement was not found 404
campaign_active_segment_exists An active campaign for the same segment already exists 409
campaign_exists A campaign with that ID already exists 409
campaign_not_found The requested campaign was not found 404
campaign_product_not_found The requested campaign product was not found 404
campaign_type_invalid Invalid campaign type provided 422
carrier_reference_invalid Invalid carrier reference provided 422
deal_not_found The requested deal was not found 404
discount_exists A discount with that ID already exists 409
discount_not_found The requested discount was not found 404
image_media_unsupported Uploaded image format is not supported 415
invalid_payload Request validation error (check errors array for details) 422
klaviyo_key_missing_permissions Klaviyo API key lacks required permissions 400
klaviyo_key_not_found Klaviyo key not configured for this shop 404
order_exists An order with that ID already exists 409
order_not_found The requested order was not found 404
org_exists An organization with that ID already exists 409
org_not_found The requested organization was not found 404
permission_denied User doesn't have permission for this operation 403
shipment_exists A shipment with that ID already exists 409
shipment_not_found The requested shipment was not found 404
shop_exists A shop with that ID already exists 409
shop_fixtures_not_found Shop fixtures need to be created first 404
shop_not_found The requested shop was not found 404
shop_settings_not_found Shop settings were not found 404
user_exists A user with that email already exists 409
user_not_found The requested user was not found 404
webhook_exists A webhook with that configuration already exists 409
webhook_not_found The requested webhook was not found 404
zip_code_invalid Invalid zip code provided 422

Server Errors (5xx)

Error Key Description HTTP Status
bad_gateway Third-party service returned an unexpected error 502
service_not_implemented The requested functionality is not yet implemented 501
unexpected An unexpected error occurred on Karla's servers 500

Validation Errors (422)

When a request fails validation, the API returns a 422 status code with additional details in the errors array:

{
  "key": "invalid_payload",
  "message": "Validation error",
  "type": "invalid_request_error",
  "errors": [
    {
      "loc": ["body", "email"],
      "msg": "field required",
      "type": "missing"
    }
  ]
}

Each validation error includes:

  • loc: The location of the error (e.g., ["body", "email"] for a missing email field in the request body)
  • msg: A human-readable error message
  • type: The type of validation error (e.g., missing, value_error, type_error)

Localization

The API supports multiple languages and delivers localized content based on the Accept-Language header provided in HTTP requests. This ensures that responses are tailored to the individual language preferences of each user.

Examples

Single Language

Accept-Language: es

With Locale

Accept-Language: en-GB

Multiple Languages with Preferences

Accept-Language: fr-CA, fr;q=0.8, en;q=0.5

Pagination

The Karla API uses page-based pagination for endpoints that return collections of resources. This provides a simple and intuitive way to navigate through large datasets.

Query Parameters

Paginated endpoints accept the following query parameters:

Parameter Type Default Description Constraints
page integer 1 The page number to retrieve Must be > 0
per_page integer 30 Number of items to return per page 1-100 items

Example Request

curl https://api.gokarla.io/v1/shops/your-shop/orders?page=2&per_page=50 \
  -u your-username:your-private-api-key

Response Format

Paginated responses return an array of items:

[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "order_number": "ORD-2024-001",
    "created_at": "2024-01-15T10:30:00Z"
  },
  {
    "id": "123e4567-e89b-12d3-a456-426614174001",
    "order_number": "ORD-2024-002",
    "created_at": "2024-01-15T11:00:00Z"
  }
]

Best Practices

  1. Choose appropriate page sizes - Larger pages reduce requests but increase response time
  2. Handle empty results - The last page may contain fewer items than per_page
  3. Respect rate limits - Pagination doesn't exempt you from rate limiting
  4. Cache when possible - Results from earlier pages are unlikely to change frequently

Versioning

When backwards-incompatible changes are made to the API, we release a new, dated version. GoKarla uses a date-based versioning scheme to ensure a predictable and stable API experience for developers.

Version Format

API versions are named for the date of their release. For example, the API version 2024-01-05 was released on Fri, 5 Jan 2024.

How to Specify a Version

You can configure your API version with the Karla-Version header. As a precaution, use API versioning to test a new API version before committing to an upgrade.

curl https://api.gokarla.io/v1/shops/your-shop/campaigns \
  -u your-username:your-private-api-key \
  -H "Karla-Version: 2024-01-05"

Default Behavior

Requests without the Karla-Version header, or with an invalid version, will default to use the latest stable version. This ensures backward compatibility while allowing developers to opt into specific versions when needed.

Major Version Changes

For significant architectural changes, the base URL path will be updated:

  • Current: /v1/
  • Future: /v2/

Major version changes are rare and will be communicated well in advance with comprehensive migration guides and at least 1 year of deprecation notice.

Shop

Create Shop

Create a shop if it does not exist.

Authorizations:
HTTPBasic
Request Body schema: application/json
required
name
required
string (Name)

Name to display

description
string or null (Description)

Shop description dependant on user language

organization
string or null (Organization)

Organization the shop belongs to (premium only)

language
string or null (LanguageEnum)
Default: "en"
Enum: "cs" "da" "nl" "en" "fi" "fr" "de" "gr" "hu" "it" "lv" "pl" "pt" "sk" "es" "sv"

Default language for the shop to fallback to in translations

shop_provider
string or null (ShopProvider)
Enum: "shopware" "shopify"

Shop system provider

shop_admin_url
string or null <uri> (Shop Admin Url) non-empty

URL for API calls to the shop

shop_faq_url
string or null (Shop Faq Url)

URL for the FAQ page

shop_service_url
string or null (Shop Service Url)

URL for the service page

shop_url
string or null <uri> (Shop Url) non-empty

URL to the main shop

logo_url
string or null <uri> (Logo Url) non-empty

Merchant logo image URL

slug
required
string (Slug)

Slug to filter

object or null (ShopCreationSettingsDTO)
Default: {"klaviyo_triggers_enabled":false,"shopify_triggers_enabled":false,"carriers_enabled":false}

Initial settings for the shop to create

Responses

Request samples

Content type
application/json
{
  • "name": "Karla",
  • "description": "Karla Shop",
  • "organization": "string",
  • "language": "cs",
  • "shop_provider": "shopware",
  • "shop_admin_url": "http://example.com",
  • "shop_faq_url": "string",
  • "shop_service_url": "string",
  • "shop_url": "http://example.com",
  • "logo_url": "http://example.com",
  • "slug": "gokarla",
  • "settings": {
    }
}

Response samples

Content type
application/json
null

Search Shops

Search shops based on some values to filter.

Authorizations:
HTTPBasic
query Parameters
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30
uuid
string or null <uuid> (Uuid)
name
string or null (Name)
slug
string or null (Slug)
shop_provider
string or null (ShopProvider)
Enum: "shopware" "shopify"

Enum for identifying the shop provider of a merchant.

language
string or null (LanguageEnum)
Enum: "cs" "da" "nl" "en" "fi" "fr" "de" "gr" "hu" "it" "lv" "pl" "pt" "sk" "es" "sv"

Supported languages.

organization
string or null (Organization)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete Shop

Delete a shop that already exists.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Responses

Response samples

Content type
application/json
null

Update Shop

Update a shop partially or completely.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
name
string or null (Name)

Name to display

description
string or null (Description)

Shop description dependant on user language

organization
string or null (Organization)

Organization the shop belongs to

language
string or null (LanguageEnum)
Default: "en"
Enum: "cs" "da" "nl" "en" "fi" "fr" "de" "gr" "hu" "it" "lv" "pl" "pt" "sk" "es" "sv"

Default language for the shop to fallback to in translations

shop_provider
string or null (ShopProvider)
Enum: "shopware" "shopify"

Shop system provider

shop_admin_url
string or null <uri> (Shop Admin Url) non-empty

URL for API calls to the shop

shop_faq_url
string or null (Shop Faq Url)

URL for the FAQ page

shop_service_url
string or null (Shop Service Url)

URL for the service page

shop_url
string or null <uri> (Shop Url) non-empty

URL to the main shop

logo_url
string or null <uri> (Logo Url) non-empty

Merchant logo image URL

Responses

Request samples

Content type
application/json
{
  • "name": "Karla",
  • "description": "Karla Shop",
  • "organization": "string",
  • "language": "cs",
  • "shop_provider": "shopware",
  • "shop_admin_url": "http://example.com",
  • "shop_faq_url": "string",
  • "shop_service_url": "string",
  • "shop_url": "http://example.com",
  • "logo_url": "http://example.com"
}

Response samples

Content type
application/json
null

Get Shop Detail

Get details about a specific shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Responses

Response samples

Content type
application/json
{
  • "created_at": "2024-01-15T10:30:00Z",
  • "updated_at": "2024-01-16T14:45:00Z",
  • "uuid": "0a1ba634-8850-4d2e-83fe-3c0b8d8e9e95",
  • "name": "Karla",
  • "slug": "gokarla",
  • "organization": "string",
  • "language": "cs",
  • "logo_url": "http://example.com",
  • "shop_url": "http://example.com",
  • "description": "Karla Shop",
  • "shop_provider": "shopware",
  • "shop_admin_url": "http://example.com",
  • "shop_faq_url": "string",
  • "shop_service_url": "string"
}

Set Klaviyo Key

Set a klaviyo api key for the shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
api_key
required
string (Api Key) [ 16 .. 128 ] characters

The api key

Responses

Request samples

Content type
application/json
{
  • "api_key": "stringstringstri"
}

Response samples

Content type
application/json
null

Set Shopify Access Token

Set a shopify access token for the shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
api_key
required
string (Api Key) [ 16 .. 128 ] characters

The api key

Responses

Request samples

Content type
application/json
{
  • "api_key": "stringstringstri"
}

Response samples

Content type
application/json
null

Set Shopware Api Credentials

Set shopware api credentials for the shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
client_id
required
string (Client Id)

The client id

client_secret
string or null (Client Secret)

The client secret

Responses

Request samples

Content type
application/json
{
  • "client_id": "string",
  • "client_secret": "string"
}

Response samples

Content type
application/json
null

Set Emarsys Api Credentials

Set emarsys api credentials for the shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
client_id
required
string (Client Id)

The client id

client_secret
string or null (Client Secret)

The client secret

Responses

Request samples

Content type
application/json
{
  • "client_id": "string",
  • "client_secret": "string"
}

Response samples

Content type
application/json
null

List Keys

List all integration keys for a shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Responses

Response samples

Content type
application/json
{
  • "brevo": "xsmtpsib-*******************************123",
  • "klaviyo": "pk_*******************************123",
  • "shopify": "shpua_****************************321",
  • "shopware": {
    },
  • "emarsys": {
    }
}

Upload Shop Image

Upload an image for a shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

image_type
required
string (ImageType)
Enum: "background" "claim" "logo" "signature" "product" "voucher"

The type of image to upload

Request Body schema: multipart/form-data
required
image
required
string <binary> (Image)

The logo image to upload

Responses

Response samples

Content type
application/json
{
  • "url": "string",
  • "image_type": "background",
  • "shop_slug": "string"
}

List Shop Products

List all products for a shop with pagination.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

query Parameters
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30
title
string or null (Title)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Product Recommendations

Get product recommendations for a shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

product_id
required
string (Product Id)

The ID of the product to get recommendations for

Responses

Response samples

Content type
application/json
{}

Shop Settings

Get Shop Settings

Get settings for a specific shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Responses

Response samples

Content type
application/json
{
  • "carriers": {
    },
  • "triggers": {
    },
  • "segments": {
    }
}

Update Shop Carrier Settings

Update carrier settings for a specific shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
shipment_updates
boolean or null (Shipment Updates)

Toggle retrieving shipment updates from carriers

Responses

Request samples

Content type
application/json
{
  • "shipment_updates": true
}

Response samples

Content type
application/json
{
  • "shipment_updates": true
}

Update Shop Trigger Settings

Update trigger settings for a specific shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
klaviyo
boolean or null (Klaviyo)

Toggle sending triggers to Klaviyo

shopify
boolean or null (Shopify)

Toggle sending triggers to Shopify

Responses

Request samples

Content type
application/json
{
  • "klaviyo": true,
  • "shopify": true
}

Response samples

Content type
application/json
{
  • "klaviyo": true,
  • "shopify": true
}

Update Shop Segment Settings

Update segment settings for a specific shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
klaviyo
boolean or null (Klaviyo)

Toggle Klaviyo segment retrieval

Responses

Request samples

Content type
application/json
{
  • "klaviyo": true
}

Response samples

Content type
application/json
{
  • "klaviyo": true,
  • "shopify": true
}

Organization

Get Org

Search for shop orders (and its trackings if any) based on filters.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the org

Responses

Response samples

Content type
application/json
{
  • "slug": null,
  • "name": null,
  • "email": null,
  • "phone": null,
  • "website": null,
  • "industry": null,
  • "sso_domain": null,
  • "feature_community": null,
  • "feature_toggles": null
}

Search Org Members

Search for shop orders (and its trackings if any) based on filters.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the org

query Parameters
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Invite User To Org

Invite a user to an organization.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
email
required
string <email> (Email)

Email of the user to invite

role
required
string (UserRole)
Enum: "admin" "editor" "viewer"

User role in the organization

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
null

User

Add User To Shop

Add a user to a shop with the specified role.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
email
required
string <email> (Email)

User email

role
required
string (UserRole)
Enum: "admin" "editor" "viewer"

Role for the shop

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "uuid": "123e4567-e89b-12d3-a456-426614174000",
  • "email": "[email protected]",
  • "name": "John Doe",
  • "is_super_admin": false,
  • "org_permissions": [
    ],
  • "shop_permissions": [
    ],
  • "last_login_at": "2021-01-01T12:00:00Z",
  • "invitation_status": "pending",
  • "feature_community": "alpha",
  • "newsletter_opt_in": false,
  • "consultation_opt_in": false
}

List Shop Users

List all users assigned to a specific shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

query Parameters
page
integer (Page) >= 1
Default: 1

Page number

per_page
integer (Per Page) [ 1 .. 100 ]
Default: 25

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Remove User From Shop

Remove a user from a shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

user_id
required
string (User Id)

The UUID of the user to remove

Responses

Response samples

Content type
application/json
null

Order

Search Orders

Search and filter orders for a specific shop.

This endpoint supports various filters including order status, date ranges,
customer information, and more. Results are paginated.
Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

query Parameters
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30
email_id
string or null (Email Id)
external_id
string or null (External Id)
order_name
string or null (Order Name)
order_number
string or null (Order Number)
uuid
string or null <uuid> (Uuid)
zip_code
string or null (Zip Code)
order_placed_from
string or null (Order Placed From)
order_placed_to
string or null (Order Placed To)
shipment_updated_since
string or null (Shipment Updated Since)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Place Order

Create a new order for the shop.

This endpoint handles order placement from your e-commerce platform.
The order will be validated, processed, and appropriate shipments will be created.
Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
order_number
required
string (Order Number)

Opinionated numeric identification of the order

order_name
string or null (Order Name)

Opinionated name of the order

order_placed_at
string or null <date-time> (Order Placed At)

Date the order was placed. Will take current time if not provided

total_order_price
number or null (Total Order Price)

Total price of the order

shipping_price
number or null (Shipping Price)

Total shipping price of the order

sub_total_price
number or null (Sub Total Price)

Subtotal price of items before shipping and discounts

discount_price
number (Discount Price)
Default: 0

Total price of all the accumulated discounts

Array of objects (Products)
Default: []

Line items for the order

Array of objects (Discounts)
Default: []

Discounts applied to the order

email_id
string or null (Email Id)

Email address of the customer

required
object (AddressWithZipCodeDTO)

Shipment delivery address

currency
string or null (Currency)
Default: "EUR"

ISO 4217 currency code (default to 'EUR')

segments
Array of strings or null (Segments)

The segments to which the user of the order belongs

weight
number or null (Weight)

Total weight of the order in grams

external_customer_id
string or null (External Customer Id)

External ID of the customer who purchased the order

order_status_url
string or null (Order Status Url)

URL to the order status page as given by the shop provider

external_id
string or null (External Id)

External identifier of the order as defined by the merchant shop system (e.g. shopify's order id). If not provided or empty, defaults to order_number.

object or null (PreferredDeliveryDate)

Preferred delivery date for the order

user_agent
string or null (User Agent)

User agent of the customer

object (Order Analytics)
Default: {}

Analytics information related to the order. This information is not used for any computation, but can be used to track the order in the merchant's analytics system.

expected_number_of_shipments
integer (Expected Number Of Shipments) <= 100
Default: 1

Expected number of shipments for the order (defaults to 1)

Responses

Request samples

Content type
application/json
{
  • "order_number": "1234",
  • "order_name": "IXF1234",
  • "order_placed_at": "2023-03-17T09:51:41+00:00",
  • "total_order_price": 29.99,
  • "shipping_price": 4.99,
  • "sub_total_price": 40,
  • "discount_price": 4.99,
  • "products": [
    ],
  • "discounts": [
    ],
  • "email_id": "[email protected]",
  • "address": {
    },
  • "currency": "EUR",
  • "segments": [
    ],
  • "weight": 1000,
  • "external_customer_id": "1234067358984",
  • "external_id": "2205783916624",
  • "preferred_delivery_date": {
    },
  • "user_agent": [
    ],
  • "order_analytics": { },
  • "expected_number_of_shipments": 1
}

Response samples

Content type
application/json
null

Upsert Order

Process a shop order upsert.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
id
required
string (Id)

Order reference whose type is defined by the id_type field

id_type
string (OrderReferenceType)
Default: "order_number"
Enum: "uuid" "external_id" "order_name" "order_number"

Type of order identifier that is passed in the reference field

object or null (OrderPlacementDTO)

Order information (will perform an upsert if provided)

required
Array of objects (Trackings)

Tracking information relevant to the order (order must exist already if it is not provided)

Responses

Request samples

Content type
application/json
{
  • "id": "11334422",
  • "id_type": "uuid",
  • "order": {
    },
  • "trackings": [
    ]
}

Response samples

Content type
application/json
null

Update Order

Process a shop order update.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

order_id
required
string <uuid> (Order Id)

The id given by Karla identifying the order

Request Body schema: application/json
required
object or null (AddressDTO-Input)

Shipment delivery address (skips update if undefined).

expected_number_of_shipments
integer or null (Expected Number Of Shipments) <= 100

Expected number of shipments for the order (skips update if undefined).

Responses

Request samples

Content type
application/json
{
  • "address": {
    },
  • "expected_number_of_shipments": 1
}

Response samples

Content type
application/json
{
  • "order_number": "1234",
  • "order_name": "IXF1234",
  • "order_placed_at": "2023-03-17T09:51:41+00:00",
  • "total_order_price": 29.99,
  • "shipping_price": 4.99,
  • "sub_total_price": 40,
  • "discount_price": 4.99,
  • "products": [
    ],
  • "discounts": [
    ],
  • "email_id": "[email protected]",
  • "address": {
    },
  • "currency": "EUR",
  • "segments": [
    ],
  • "weight": 1000,
  • "external_customer_id": "1234067358984",
  • "merchant_slug": "string",
  • "external_id": "string",
  • "uuid": "b4fadda9-61f4-4041-94d2-7a01ee0082b4",
  • "trackings": [
    ]
}

Update Order Shipment

Process a shop order shipment update.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

order_id
required
string <uuid> (Order Id)

The id given by Karla identifying the order

shipment_id
required
string <uuid> (Shipment Id)

The id given by Karla identifying the tracking from the order

Request Body schema: application/json
required
tracking_url
string or null (Tracking Url)

The tracking URL as it comes from the carrier.

Array of objects or null (Products)

Line items involved in the delivery. Give an empty list to remove all products from the shipment.Any list provided will override the current products in the shipment (there is no merge). Will be skipped from update if not given

Responses

Request samples

Content type
application/json
{
  • "tracking_url": "string",
  • "products": [
    ]
}

Response samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "estimated_arrival": {
    },
  • "carrier": {
    },
  • "flag": "normal",
  • "pickup": {
    },
  • "products": [ ],
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",
  • "merchant_slug": "string",
  • "shop_slug": "string",
  • "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
  • "order_number": "string"
}

Fulfill Orders

Process a shop order fulfillment in bulk (via shop slug).

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
Array
id
required
string (Id)

Order reference whose type is defined by the id_type field

id_type
string (OrderReferenceType)
Default: "order_number"
Enum: "uuid" "external_id" "order_name" "order_number"

Type of order identifier that is passed in the reference field

object or null (OrderPlacementDTO)

Order information (will perform an upsert if provided)

required
Array of objects (Trackings)

Tracking information relevant to the order (order must exist already if it is not provided)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
null

Shipment

Create New Shipment Event

Create a new event for a shipment.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Shop slug)
Request Body schema: application/json
required
event_name
required
string (Event Name)

The event to be added to the shipment. See Shipment Events for more details.

Must be one of- ACCEPTED_BY_DESTINATION_OFFICE
- ACCEPTED_BY_ORIGIN_OFFICE
- ARRIVAL_AT_FINAL_DELIVERY_CENTER
- ARRIVAL_AT_TRANSPORT_HUB
- ARRIVAL_IN_DESTINATION_COUNTRY
- ARRIVED_AT_COMMUNITY_BOX
- ARRIVED_AT_PARCEL_LOCKER
- ARRIVED_AT_PARCEL_SHOP
- ARRIVED_AT_PICKUP_POINT
- ARRIVED_AT_POST_OFFICE
- ARRIVED_AT_SORTING_CENTER
- ASSIGNED_TO_TRANSPORT
- ATTEMPTED_DELIVERY_UNDELIVERABLE
- AT_SORTING_CENTER
- AT_TRANSPORT_HUB
- CARRIER_UNKNOWN
- COMPLETION_OF_CUSTOMS_PROCESSING
- COMPLETION_OF_EXPORT_PROCESSING
- CUSTOMS_PROCESSING
- DELAY_EXPECTED
- DELAY_IN_TRANSPORT
- DELAY_IN_TRANSPORT_MISROUTED_SHIPMENT
- DELAY_IN_TRANSPORT_OFFLOADED_SHIPMENT
- DELIVERY_ATTEMPTED
- DELIVERY_ATTEMPTED_ADDRESSEE_MOVED
- DELIVERY_ATTEMPTED_ADDRESSEE_NOT_KNOWN_AT_ADDRESS
- DELIVERY_ATTEMPTED_ADDRESS_COULD_NOT_BE_FOUND
- DELIVERY_ATTEMPTED_CASH_ON_DELIVERY_AMOUNT_NOT_READY
- DELIVERY_ATTEMPTED_FAILED_WILL_TRY_AGAIN
- DELIVERY_ATTEMPTED_FORWARDING_TO_PICKUP_LOCATION
- DELIVERY_ATTEMPTED_LAST_ATTEMPT
- DELIVERY_ATTEMPTED_RECIPIENT_NOT_AT_HOME
- DELIVERY_ATTEMPTED_RECIPIENT_NOT_AT_HOME_CARD_LEFT
- DELIVERY_ATTEMPTED_REJECTED_BY_ADDRESSEE
- DELIVERY_FAILED_SHIPMENT_DESTROYED
- DELIVERY_LAPSED
- DELIVERY_OPTION_ALTERNATE_LOCATION_REQUESTED
- DELIVERY_OPTION_ALTERNATE_LOCATION_REQUESTED_LOCKER
- DELIVERY_OPTION_ALTERNATE_LOCATION_REQUESTED_SHOP
- DELIVERY_OPTION_ALTERNATE_TIME_REQUESTED
- DELIVERY_OPTION_REQUESTED_BY_RECEIVER
- DELIVERY_SCHEDULED_IN_THE_FINAL_DELIVERY_DEPOT
- DEPARTURE_FROM_TRANSPORT_HUB
- DISPATCHED_FROM_DELIVERY_CENTER
- DISPATCHED_FROM_FORWARDING_DEPOT
- DISPATCHED_FROM_SORTING_CENTER
- DISPATCHING_STARTED_AT_PROCESSING_CENTER
- ENCODING_COMPLETED_AT_PROCESSING_CENTER
- ENCODING_ERROR_IN_PROCESSING_AT_SORTING_CENTER
- ENCODING_STARTED_AT_PROCESSING_CENTER
- ERROR_IN_PARCEL_DATA_SUBMISSION
- ERROR_IN_PROCESSING_AT_SORTING_CENTER
- EXPORT_PROCESSING
- FAILED_TO_HAND_OVER_TO_DELIVERY_PARTNER
- HANDED_OVER_TO_DELIVERY_PARTNER
- HELD_AT_CUSTOMS
- HELD_AT_CUSTOMS_FOR_ADDITIONAL_PAYMENT
- HELD_AT_CUSTOMS_FOR_CLARIFICATIONS
- HELD_AT_EXPORT_PROCESSING
- INBOUND_FLIGHT_ARRIVED
- INBOUND_TRUCK_ARRIVED
- IN_DELIVERY
- ISSUES_IN_PROCESSING_BY_CUSTOMS_AUTHORITIES
- MISSING_SHIPMENT_INFORMATION
- MORE_INFO_ON_CARRIER_WEBSITE
- NO_DELIVERY_ATTEMPT_ON_ROUTE
- ORDER_CANCELLED
- ORDER_CREATED
- ORDER_DELAYED
- ORDER_IN_PROCESSING
- ORDER_PROCESSED
- OUTBOUND_FLIGHT_DEPARTED
- OUTBOUND_TRUCK_DEPARTED
- OUT_FOR_DELIVERY
- PACKAGE_REROUTING_CANCELED_ROUTE_TO_HOME
- PARCEL_COLLECTED_FROM_DROP_OFF_LOCATION
- PARCEL_DATA_SUBMISSION_DELAYED
- PARCEL_DATA_SUBMITTED_TO_CARRIER
- PARCEL_DISPATCHED
- PARCEL_DROPPED_OFF_AT_PARCEL_LOCKER
- PARCEL_DROPPED_OFF_AT_POST_OFFICE
- PARCEL_DROPPED_OFF_IN_PARCEL_SHOP
- PARCEL_DROPPED_OFF_OVER_THE_COUNTER
- PARCEL_DROPPED_OFF_WITH_CARRIER
- PARCEL_READY_FOR_PICKUP
- PARCEL_TRANSFERRED_TO_THIRD_PARTY
- PATCHED
- PICKUP_ATTEMPTED
- PICKUP_DELAYED
- PICKUP_FAILED
- PICKUP_SUCCESSFUL
- PROCEEDING_TO_CARRIER_FACILITY
- PROCESSED_AT_DELIVERY_CENTER
- PROCESSING_AT_TRANSPORT_HUB
- RECEIPT_AT_FORWARDING_DEPOT
- RETURNED_TO_DELIVERY_DEPOT
- RETURN_IN_PROGRESS
- RETURN_TO_ORIGIN_COUNTRY_CANCELLED
- RETURN_TO_ORIGIN_COUNTRY_COMPLETED
- RETURN_TO_ORIGIN_COUNTRY_FAILED
- RETURN_TO_SENDER_COMPLETED
- RETURN_TO_SENDER_FAILED
- RETURN_TO_SENDER_FAILED_RECIPIENT_VERIFICATION
- SCANNED_AT_PROCESSING_CENTER
- SHIPMENT_AT_FINAL_DELIVERY_CENTER
- SHIPMENT_CANCELLED
- SHIPMENT_DAMAGED
- SHIPMENT_DELAYED_DUE_TO_CUSTOMER_REQUEST
- SHIPMENT_EN_ROUTE
- SHIPMENT_INFO_SENT_TO_LAST_MILE_SERVICE_PROVIDER
- SHIPMENT_LOST
- SHIPMENT_LOST_IN_DELIVERY
- SHIPMENT_LOST_IN_PROCESSING
- SHIPMENT_LOST_IN_SORTING_CENTER
- SHIPMENT_LOST_IN_TRANSIT
- SHIPMENT_LOST_IN_TRANSPORT
- SHIPMENT_LOST_UNKNOWN_REASON
- SHIPMENT_MISROUTED
- SHIPMENT_NEVER_ARRIVED
- SHIPMENT_NOT_PICKED_UP_FROM_DEPOT_RETURNED_TO_BASE
- SHIPMENT_NOT_PICKED_UP_FROM_DEPOT_RETURNED_TO_ORIGIN_COUNTRY
- SHIPMENT_NOT_PICKED_UP_FROM_PARCEL_LOCKER_RETURNED_TO_BASE
- SHIPMENT_NOT_PICKED_UP_FROM_PARCEL_LOCKER_RETURNED_TO_ORIGIN_COUNTRY
- SHIPMENT_NOT_PICKED_UP_FROM_PARCEL_SHOP_RETURNED_TO_BASE
- SHIPMENT_NOT_PICKED_UP_FROM_PARCEL_SHOP_RETURNED_TO_ORIGIN_COUNTRY
- SHIPMENT_NOT_PICKED_UP_FROM_POST_OFFICE_RETURNED_TO_BASE
- SHIPMENT_NOT_PICKED_UP_FROM_POST_OFFICE_RETURNED_TO_ORIGIN_COUNTRY
- SHIPMENT_NOT_PICKED_UP_RETURNED_TO_BASE
- SHIPMENT_NOT_PICKED_UP_RETURNED_TO_ORIGIN_COUNTRY
- SHIPMENT_ON_HOLD_IN_DELIVERY_CENTER
- SHIPMENT_ON_ITS_WAY_TO_PICKUP_LOCATION
- SHIPMENT_REJECTED_RETURNING_TO_SENDER
- SHIPMENT_RETURNED_TO_ORIGIN_COUNTRY
- SHIPMENT_RETURNED_TO_SENDER
- SHIPMENT_RETURNING_TO_SENDER
- SHIPMENT_SUCCESSFULLY_RETURNED_TO_SENDER
- SHIPMENT_UPDATED_ETA
- SORTING_COMPLETED_AT_PROCESSING_CENTER
- SORTING_ERROR_IN_PROCESSING_AT_SORTING_CENTER
- SORTING_STARTED_AT_PROCESSING_CENTER
- START_OF_CUSTOMS_PROCESSING
- START_OF_EXPORT_PROCESSING
- SUCCESSFULLY_COLLECTED
- SUCCESSFULLY_COLLECTED_AT_PARCEL_LOCKER
- SUCCESSFULLY_COLLECTED_AT_PARCEL_SHOP
- SUCCESSFULLY_COLLECTED_AT_POST_OFFICE
- SUCCESSFULLY_DELIVERED
- SUCCESSFULLY_DELIVERED_AND_CASH_ON_DELIVERY_COLLECTED
- SUCCESSFULLY_DELIVERED_AND_LEFT_AT_DOOR
- SUCCESSFULLY_DELIVERED_AND_LEFT_AT_LETTER_BOX
- SUCCESSFULLY_DELIVERED_AND_PROOF_OF_DELIVERY_COLLECTED
- SUCCESSFULLY_DELIVERED_TO_NEIGHBOR
- SUCCESSFULLY_DELIVERED_TO_THE_COMMUNITY_MAILBOX
- TRANSPORT_ARRIVED
- TRANSPORT_DEPARTED
- USER_SUCCESSFULLY_DELIVERED

event_time
string or null <date-time> (Event Time)

The event time to be added to the shipment (defaults to current time if not given)

external_id
required
string (External Id)

The external ID of the event.

id
required
string (Id)

Reference of the shipment where you want to add the event. Do not provide order-related references if you expect multiple shipments per order. If an order-related reference is provided, we will pick the first shipment found in a multi-shipment scenario.

id_type
string (ShipmentReferenceType)
Default: "tracking_number"
Enum: "external_order_id" "external_shipment_id" "order_name" "order_number" "order_uuid" "shipment_uuid" "tracking_number"

Type of shipment identifier that is passed in the reference field

Responses

Request samples

Content type
application/json
{
  • "event_name": "ORDER_CREATED",
  • "event_time": "2021-09-01T00:00:00Z",
  • "external_id": "123456",
  • "id": "11334422",
  • "id_type": "external_order_id"
}

Response samples

Content type
application/json
null

Create New Shipment Event By Id

Create a new event for a shipment using shipment UUID.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Shop slug)
shipment_id
required
string (Shipment UUID)
Request Body schema: application/json
required
event_name
required
string (Event Name)

The event to be added to the shipment. See Shipment Events for more details.

Must be one of- ACCEPTED_BY_DESTINATION_OFFICE
- ACCEPTED_BY_ORIGIN_OFFICE
- ARRIVAL_AT_FINAL_DELIVERY_CENTER
- ARRIVAL_AT_TRANSPORT_HUB
- ARRIVAL_IN_DESTINATION_COUNTRY
- ARRIVED_AT_COMMUNITY_BOX
- ARRIVED_AT_PARCEL_LOCKER
- ARRIVED_AT_PARCEL_SHOP
- ARRIVED_AT_PICKUP_POINT
- ARRIVED_AT_POST_OFFICE
- ARRIVED_AT_SORTING_CENTER
- ASSIGNED_TO_TRANSPORT
- ATTEMPTED_DELIVERY_UNDELIVERABLE
- AT_SORTING_CENTER
- AT_TRANSPORT_HUB
- CARRIER_UNKNOWN
- COMPLETION_OF_CUSTOMS_PROCESSING
- COMPLETION_OF_EXPORT_PROCESSING
- CUSTOMS_PROCESSING
- DELAY_EXPECTED
- DELAY_IN_TRANSPORT
- DELAY_IN_TRANSPORT_MISROUTED_SHIPMENT
- DELAY_IN_TRANSPORT_OFFLOADED_SHIPMENT
- DELIVERY_ATTEMPTED
- DELIVERY_ATTEMPTED_ADDRESSEE_MOVED
- DELIVERY_ATTEMPTED_ADDRESSEE_NOT_KNOWN_AT_ADDRESS
- DELIVERY_ATTEMPTED_ADDRESS_COULD_NOT_BE_FOUND
- DELIVERY_ATTEMPTED_CASH_ON_DELIVERY_AMOUNT_NOT_READY
- DELIVERY_ATTEMPTED_FAILED_WILL_TRY_AGAIN
- DELIVERY_ATTEMPTED_FORWARDING_TO_PICKUP_LOCATION
- DELIVERY_ATTEMPTED_LAST_ATTEMPT
- DELIVERY_ATTEMPTED_RECIPIENT_NOT_AT_HOME
- DELIVERY_ATTEMPTED_RECIPIENT_NOT_AT_HOME_CARD_LEFT
- DELIVERY_ATTEMPTED_REJECTED_BY_ADDRESSEE
- DELIVERY_FAILED_SHIPMENT_DESTROYED
- DELIVERY_LAPSED
- DELIVERY_OPTION_ALTERNATE_LOCATION_REQUESTED
- DELIVERY_OPTION_ALTERNATE_LOCATION_REQUESTED_LOCKER
- DELIVERY_OPTION_ALTERNATE_LOCATION_REQUESTED_SHOP
- DELIVERY_OPTION_ALTERNATE_TIME_REQUESTED
- DELIVERY_OPTION_REQUESTED_BY_RECEIVER
- DELIVERY_SCHEDULED_IN_THE_FINAL_DELIVERY_DEPOT
- DEPARTURE_FROM_TRANSPORT_HUB
- DISPATCHED_FROM_DELIVERY_CENTER
- DISPATCHED_FROM_FORWARDING_DEPOT
- DISPATCHED_FROM_SORTING_CENTER
- DISPATCHING_STARTED_AT_PROCESSING_CENTER
- ENCODING_COMPLETED_AT_PROCESSING_CENTER
- ENCODING_ERROR_IN_PROCESSING_AT_SORTING_CENTER
- ENCODING_STARTED_AT_PROCESSING_CENTER
- ERROR_IN_PARCEL_DATA_SUBMISSION
- ERROR_IN_PROCESSING_AT_SORTING_CENTER
- EXPORT_PROCESSING
- FAILED_TO_HAND_OVER_TO_DELIVERY_PARTNER
- HANDED_OVER_TO_DELIVERY_PARTNER
- HELD_AT_CUSTOMS
- HELD_AT_CUSTOMS_FOR_ADDITIONAL_PAYMENT
- HELD_AT_CUSTOMS_FOR_CLARIFICATIONS
- HELD_AT_EXPORT_PROCESSING
- INBOUND_FLIGHT_ARRIVED
- INBOUND_TRUCK_ARRIVED
- IN_DELIVERY
- ISSUES_IN_PROCESSING_BY_CUSTOMS_AUTHORITIES
- MISSING_SHIPMENT_INFORMATION
- MORE_INFO_ON_CARRIER_WEBSITE
- NO_DELIVERY_ATTEMPT_ON_ROUTE
- ORDER_CANCELLED
- ORDER_CREATED
- ORDER_DELAYED
- ORDER_IN_PROCESSING
- ORDER_PROCESSED
- OUTBOUND_FLIGHT_DEPARTED
- OUTBOUND_TRUCK_DEPARTED
- OUT_FOR_DELIVERY
- PACKAGE_REROUTING_CANCELED_ROUTE_TO_HOME
- PARCEL_COLLECTED_FROM_DROP_OFF_LOCATION
- PARCEL_DATA_SUBMISSION_DELAYED
- PARCEL_DATA_SUBMITTED_TO_CARRIER
- PARCEL_DISPATCHED
- PARCEL_DROPPED_OFF_AT_PARCEL_LOCKER
- PARCEL_DROPPED_OFF_AT_POST_OFFICE
- PARCEL_DROPPED_OFF_IN_PARCEL_SHOP
- PARCEL_DROPPED_OFF_OVER_THE_COUNTER
- PARCEL_DROPPED_OFF_WITH_CARRIER
- PARCEL_READY_FOR_PICKUP
- PARCEL_TRANSFERRED_TO_THIRD_PARTY
- PATCHED
- PICKUP_ATTEMPTED
- PICKUP_DELAYED
- PICKUP_FAILED
- PICKUP_SUCCESSFUL
- PROCEEDING_TO_CARRIER_FACILITY
- PROCESSED_AT_DELIVERY_CENTER
- PROCESSING_AT_TRANSPORT_HUB
- RECEIPT_AT_FORWARDING_DEPOT
- RETURNED_TO_DELIVERY_DEPOT
- RETURN_IN_PROGRESS
- RETURN_TO_ORIGIN_COUNTRY_CANCELLED
- RETURN_TO_ORIGIN_COUNTRY_COMPLETED
- RETURN_TO_ORIGIN_COUNTRY_FAILED
- RETURN_TO_SENDER_COMPLETED
- RETURN_TO_SENDER_FAILED
- RETURN_TO_SENDER_FAILED_RECIPIENT_VERIFICATION
- SCANNED_AT_PROCESSING_CENTER
- SHIPMENT_AT_FINAL_DELIVERY_CENTER
- SHIPMENT_CANCELLED
- SHIPMENT_DAMAGED
- SHIPMENT_DELAYED_DUE_TO_CUSTOMER_REQUEST
- SHIPMENT_EN_ROUTE
- SHIPMENT_INFO_SENT_TO_LAST_MILE_SERVICE_PROVIDER
- SHIPMENT_LOST
- SHIPMENT_LOST_IN_DELIVERY
- SHIPMENT_LOST_IN_PROCESSING
- SHIPMENT_LOST_IN_SORTING_CENTER
- SHIPMENT_LOST_IN_TRANSIT
- SHIPMENT_LOST_IN_TRANSPORT
- SHIPMENT_LOST_UNKNOWN_REASON
- SHIPMENT_MISROUTED
- SHIPMENT_NEVER_ARRIVED
- SHIPMENT_NOT_PICKED_UP_FROM_DEPOT_RETURNED_TO_BASE
- SHIPMENT_NOT_PICKED_UP_FROM_DEPOT_RETURNED_TO_ORIGIN_COUNTRY
- SHIPMENT_NOT_PICKED_UP_FROM_PARCEL_LOCKER_RETURNED_TO_BASE
- SHIPMENT_NOT_PICKED_UP_FROM_PARCEL_LOCKER_RETURNED_TO_ORIGIN_COUNTRY
- SHIPMENT_NOT_PICKED_UP_FROM_PARCEL_SHOP_RETURNED_TO_BASE
- SHIPMENT_NOT_PICKED_UP_FROM_PARCEL_SHOP_RETURNED_TO_ORIGIN_COUNTRY
- SHIPMENT_NOT_PICKED_UP_FROM_POST_OFFICE_RETURNED_TO_BASE
- SHIPMENT_NOT_PICKED_UP_FROM_POST_OFFICE_RETURNED_TO_ORIGIN_COUNTRY
- SHIPMENT_NOT_PICKED_UP_RETURNED_TO_BASE
- SHIPMENT_NOT_PICKED_UP_RETURNED_TO_ORIGIN_COUNTRY
- SHIPMENT_ON_HOLD_IN_DELIVERY_CENTER
- SHIPMENT_ON_ITS_WAY_TO_PICKUP_LOCATION
- SHIPMENT_REJECTED_RETURNING_TO_SENDER
- SHIPMENT_RETURNED_TO_ORIGIN_COUNTRY
- SHIPMENT_RETURNED_TO_SENDER
- SHIPMENT_RETURNING_TO_SENDER
- SHIPMENT_SUCCESSFULLY_RETURNED_TO_SENDER
- SHIPMENT_UPDATED_ETA
- SORTING_COMPLETED_AT_PROCESSING_CENTER
- SORTING_ERROR_IN_PROCESSING_AT_SORTING_CENTER
- SORTING_STARTED_AT_PROCESSING_CENTER
- START_OF_CUSTOMS_PROCESSING
- START_OF_EXPORT_PROCESSING
- SUCCESSFULLY_COLLECTED
- SUCCESSFULLY_COLLECTED_AT_PARCEL_LOCKER
- SUCCESSFULLY_COLLECTED_AT_PARCEL_SHOP
- SUCCESSFULLY_COLLECTED_AT_POST_OFFICE
- SUCCESSFULLY_DELIVERED
- SUCCESSFULLY_DELIVERED_AND_CASH_ON_DELIVERY_COLLECTED
- SUCCESSFULLY_DELIVERED_AND_LEFT_AT_DOOR
- SUCCESSFULLY_DELIVERED_AND_LEFT_AT_LETTER_BOX
- SUCCESSFULLY_DELIVERED_AND_PROOF_OF_DELIVERY_COLLECTED
- SUCCESSFULLY_DELIVERED_TO_NEIGHBOR
- SUCCESSFULLY_DELIVERED_TO_THE_COMMUNITY_MAILBOX
- TRANSPORT_ARRIVED
- TRANSPORT_DEPARTED
- USER_SUCCESSFULLY_DELIVERED

event_time
string or null <date-time> (Event Time)

The event time to be added to the shipment (defaults to current time if not given)

external_id
required
string (External Id)

The external ID of the event.

Responses

Request samples

Content type
application/json
{
  • "event_name": "ORDER_CREATED",
  • "event_time": "2021-09-01T00:00:00Z",
  • "external_id": "123456"
}

Response samples

Content type
application/json
null

Claim

Create Claim

Create a claim if it does not exist.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
resolution_preference
string or null (ClaimResolutionPreference)
Enum: "reorder" "refund" "keep_with_reward"

Claim resolution preference

reason
required
string (ClaimReason)
Enum: "partial_damage" "damage" "investigation" "support" "return" "dissatisfied_with_product" "wrong_product" "missing_product"

Reason to submit the claim

status
string or null (ClaimStatus)
Enum: "pending" "accepted" "rejected" "closed"

Claim status

description
string or null (Description)

Complimentary description to explain why the claim was submitted

customer_signature_image_url
string or null (Customer Signature Image Url)

The private image url with the client signature

Array of objects (Selected Items)
Default: []

List of selected product items

image_urls
Array of strings (Image Urls)
Default: []

List of image URLs that give evidence of the damaged product or claim in general

optional_image_urls
Array of strings (Optional Image Urls)
Default: []

List of image urls classified as optional (not required for the claim but that may help to resolve it)

dropoff_permission
boolean or null (Dropoff Permission)

The customer's response about whether they authorized the carrier to leave the package at a designated spot without requiring direct delivery

Array of objects or null (Step User Input)

User input for each step in the claim process

shipment_id
string or null <uuid> (Shipment Id)

Unique identifier for the system in Karla. If not provided, a tracking number has to be given.

Array of objects (Damaged Product Items)
Default: []

List of damaged product items (DEPRECATED)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "deleted_at": null,
  • "uuid": "38fdc365-7de9-4313-afbd-0ed23717c5e0",
  • "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
  • "shipment_id": "e415c869-52a9-4dbd-bb4b-c8a6b3968a51",
  • "shop_id": "38fdc365-7de9-4313-afbd-0ed23717c5e0",
  • "order_number": "12345",
  • "resolution_preference": "reorder",
  • "reason": "partial_damage",
  • "status": "pending",
  • "description": "Package was damaged on the right side",
  • "damaged_product_items": [ ],
  • "selected_items": [ ],
  • "image_urls": [ ],
  • "optional_image_urls": [ ],
  • "address": {
    },
  • "net_invoice_amount": 0,
  • "tracking_number": "string",
  • "carrier_reference": "amz",
  • "scan_date": "2024-03-14T07:14:23+00:00",
  • "weight_kg": 0,
  • "dropoff_permission": true,
  • "step_user_input": [
    ],
  • "shop_slug": "gokarla"
}

Search Claims

Search all claims or based on some values to filter.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

query Parameters
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30
order_id
string or null <uuid> (Order Id)
shipment_id
string or null <uuid> (Shipment Id)
resolution_preference
string or null (ClaimResolutionPreference)
Enum: "reorder" "refund" "keep_with_reward"

Type resolution preference for a claim.

status
string or null (ClaimStatus)
Enum: "pending" "accepted" "rejected" "closed"

Type status for a claim.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete Claim

Delete a claim that already exists.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

uuid
required
string <uuid> (Uuid)

The claim's unique identifier

Responses

Response samples

Content type
application/json
{ }

Update Claim

Modify an existing claim.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

uuid
required
string <uuid> (Uuid)

The claim's unique identifier

Request Body schema: application/json
required
resolution_preference
string or null (ClaimResolutionPreference)
Enum: "reorder" "refund" "keep_with_reward"

Claim resolution preference

status
string or null (ClaimStatus)
Enum: "pending" "accepted" "rejected" "closed"

Claim status

Responses

Request samples

Content type
application/json
{
  • "resolution_preference": "reorder",
  • "status": "pending"
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "deleted_at": null,
  • "uuid": "38fdc365-7de9-4313-afbd-0ed23717c5e0",
  • "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
  • "shipment_id": "e415c869-52a9-4dbd-bb4b-c8a6b3968a51",
  • "shop_id": "38fdc365-7de9-4313-afbd-0ed23717c5e0",
  • "order_number": "12345",
  • "resolution_preference": "reorder",
  • "reason": "partial_damage",
  • "status": "pending",
  • "description": "Package was damaged on the right side",
  • "damaged_product_items": [ ],
  • "selected_items": [ ],
  • "image_urls": [ ],
  • "optional_image_urls": [ ],
  • "address": {
    },
  • "net_invoice_amount": 0,
  • "tracking_number": "string",
  • "carrier_reference": "amz",
  • "scan_date": "2024-03-14T07:14:23+00:00",
  • "weight_kg": 0,
  • "dropoff_permission": true,
  • "step_user_input": [
    ],
  • "shop_slug": "gokarla"
}

Campaign

Create Campaign

Create a campaign if it does not exist.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
enabled
boolean (Enabled)
Default: false

Campaign visibility toggle. Only one campaign can be enabled per segment at a time.

name
required
string (Name)

Campaign name to be used internally

start_date
string or null <date-time> (Start Date)

Time in which the campaign will start (defaults to now)

end_date
string or null <date-time> (End Date)

Time in which the campaign will end

segment
required
string (Segment)

Segment to which the campaign is targeted

promotion_type
required
string (PromotionType)
Enum: "product" "basic" "banner"

Type of promotion

required
Promotion Properties (object) or BasicPromotionPropertiesDTO (object) or ProductPromotionPropertiesDTO (object) or BannerPromotionPropertiesDTO (object) (Promotion Properties)

The properties of the promotion

discount_id
string or null <uuid> (Discount Id)

Discount UUID

Responses

Request samples

Content type
application/json
{
  • "enabled": false,
  • "name": "Q3 Campaign",
  • "start_date": "2024-10-01T00:00:00Z",
  • "end_date": "2024-10-11T00:00:00Z",
  • "segment": "b2b",
  • "promotion_type": "product",
  • "promotion_properties": { },
  • "discount_id": "550e8400-e29b-41d4-a716-446655440000"
}

Response samples

Content type
application/json
{
  • "enabled": false,
  • "name": "Q3 Campaign",
  • "start_date": "2024-10-01T00:00:00Z",
  • "end_date": "2024-10-11T00:00:00Z",
  • "segment": "b2b",
  • "promotion_type": "product",
  • "promotion_properties": { },
  • "uuid": "d1e99924-df48-4781-b3ad-ff147d3e70a2",
  • "shop_slug": "gokarla",
  • "status": "active",
  • "discount": {
    }
}

Search Campaigns

Search all campaigns or based on some values to filter.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

query Parameters
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30
uuid
string or null <uuid> (Uuid)
name
string or null (Name)
start_date
string or null <date-time> (Start Date)
end_date
string or null <date-time> (End Date)
segment
string or null (Segment)
promotion_type
string or null (PromotionType)
Enum: "product" "basic" "banner"

Type of the Campaign to store.

enabled
boolean or null (Enabled)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete Campaign

Delete a campaign that already exists.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

uuid
required
string <uuid> (Uuid)

The campaign's unique identifier

Responses

Response samples

Content type
application/json
{ }

Update Campaign

Update a campaign completely.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

uuid
required
string <uuid> (Uuid)

The campaign's unique identifier

Request Body schema: application/json
required
enabled
boolean (Enabled)
Default: false

Campaign visibility toggle. Only one campaign can be enabled per segment at a time.

name
required
string (Name)

Campaign name to be used internally

start_date
string or null <date-time> (Start Date)

Time in which the campaign will start (defaults to now)

end_date
string or null <date-time> (End Date)

Time in which the campaign will end

segment
required
string (Segment)

Segment to which the campaign is targeted

promotion_type
required
string (PromotionType)
Enum: "product" "basic" "banner"

Type of promotion

required
Promotion Properties (object) or BasicPromotionPropertiesDTO (object) or ProductPromotionPropertiesDTO (object) or BannerPromotionPropertiesDTO (object) (Promotion Properties)

The properties of the promotion

discount_id
string or null <uuid> (Discount Id)

Discount UUID

Responses

Request samples

Content type
application/json
{
  • "enabled": false,
  • "name": "Q3 Campaign",
  • "start_date": "2024-10-01T00:00:00Z",
  • "end_date": "2024-10-11T00:00:00Z",
  • "segment": "b2b",
  • "promotion_type": "product",
  • "promotion_properties": { },
  • "discount_id": "550e8400-e29b-41d4-a716-446655440000"
}

Response samples

Content type
application/json
{
  • "enabled": false,
  • "name": "Q3 Campaign",
  • "start_date": "2024-10-01T00:00:00Z",
  • "end_date": "2024-10-11T00:00:00Z",
  • "segment": "b2b",
  • "promotion_type": "product",
  • "promotion_properties": { },
  • "uuid": "d1e99924-df48-4781-b3ad-ff147d3e70a2",
  • "shop_slug": "gokarla",
  • "status": "active",
  • "discount": {
    }
}

Get Campaign By Order Number

Get campaigns for an order by order number.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

order_number
required
string (Order Number)

The order's unique identifier

Responses

Response samples

Content type
application/json
{
  • "banner": {
    },
  • "basic": {
    },
  • "product": {
    }
}

Discount

Create Discount

Create a discount if it does not exist.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
code
string or null (Code)

Discount promotion code

target_selection
string or null (DiscountTargetSelectionEnum)
Enum: "all" "group" "specific"

The selection method for line items or shipping lines to be discounted.

target_type
string or null (DiscountTargetTypeEnum)
Enum: "line_item" "shipping_line"

The type of item that the discount applies to.

title
string or null (Title)

The customer facing name of the discount

value_type
string or null (DiscountValueTypeEnum)
Enum: "percentage" "fixed_amount"

Type of discount value

value
number or null (Value)

Discount value based on its type

type
required
string (DiscountTypeEnum)
Enum: "product" "order" "shipping"

Type of discount

Responses

Request samples

Content type
application/json
{
  • "code": "KARLA",
  • "target_selection": "all",
  • "target_type": "line_item",
  • "title": "string",
  • "value_type": "percentage",
  • "value": 3.49,
  • "type": "product"
}

Response samples

Content type
application/json
null

Search Discounts

Search all discounts or based on some values to filter.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

query Parameters
code
string or null (Code)
target_selection
string or null (DiscountTargetSelectionEnum)
Enum: "all" "group" "specific"

Selection method for line items or shipping lines to be discounted.

target_type
string or null (DiscountTargetTypeEnum)
Enum: "line_item" "shipping_line"

Type of item that the discount applies to..

title
string or null (Title)
value_type
string or null (DiscountValueTypeEnum)
Enum: "percentage" "fixed_amount"

Type of value for order and product discounts.

value
number or null (Value)
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30
uuid
string or null <uuid> (Uuid)
type
string or null (DiscountTypeEnum)
Enum: "product" "order" "shipping"

Type of discount.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete Discount

Delete a discount that already exists.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

uuid
required
string <uuid> (Uuid)

The discount's unique identifier

Responses

Response samples

Content type
application/json
null

Update Discount

Update a discount partially or completely.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

uuid
required
string <uuid> (Uuid)

The discount's unique identifier

Request Body schema: application/json
required
code
string or null (Code)

Discount promotion code

target_selection
string or null (DiscountTargetSelectionEnum)
Enum: "all" "group" "specific"

The selection method for line items or shipping lines to be discounted.

target_type
string or null (DiscountTargetTypeEnum)
Enum: "line_item" "shipping_line"

The type of item that the discount applies to.

title
string or null (Title)

The customer facing name of the discount

value_type
string or null (DiscountValueTypeEnum)
Enum: "percentage" "fixed_amount"

Type of discount value

value
number or null (Value)

Discount value based on its type

Responses

Request samples

Content type
application/json
{
  • "code": "KARLA",
  • "target_selection": "all",
  • "target_type": "line_item",
  • "title": "string",
  • "value_type": "percentage",
  • "value": 3.49
}

Response samples

Content type
application/json
null

Deal

List Deals

List all deals.

Authorizations:
HTTPBasic
query Parameters
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List Shop Deals

List all deals for a shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

query Parameters
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Deal

Create a deal for a shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
discount_id
required
string <uuid> (Discount Id)

Discount UUID

brand_image_url
string or null <uri> (Brand Image Url) non-empty

Brand image URL

brand_logo_url
string or null <uri> (Brand Logo Url) non-empty

Brand logo URL

cta_url
string or null <uri> (Cta Url) non-empty

CTA URL

title
string or null (Title)

Title

description
string or null (Description)

Description

Array of objects or null (Translations)

Translations

Responses

Request samples

Content type
application/json
{
  • "discount_id": "49c104c1-008b-4f4f-abbc-6958059cb48b",
  • "brand_image_url": "http://example.com",
  • "brand_logo_url": "http://example.com",
  • "cta_url": "http://example.com",
  • "title": "string",
  • "description": "string",
  • "translations": [
    ]
}

Response samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "shop_slug": "string",
  • "shop_name": "string",
  • "discount_id": "49c104c1-008b-4f4f-abbc-6958059cb48b",
  • "brand_image_url": "http://example.com",
  • "brand_logo_url": "http://example.com",
  • "cta_url": "http://example.com",
  • "title": "string",
  • "description": "string",
  • "rank": 0,
  • "discount": {
    },
  • "translations": [
    ]
}

Update Deal

Update a deal for a shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

deal_id
required
string (Deal Id)

The ID of the deal

Request Body schema: application/json
required
discount_id
string or null <uuid> (Discount Id)

Discount UUID

brand_image_url
string or null <uri> (Brand Image Url) non-empty

Brand image URL

brand_logo_url
string or null <uri> (Brand Logo Url) non-empty

Brand logo URL

cta_url
string or null <uri> (Cta Url) non-empty

CTA URL

title
string or null (Title)

Title

description
string or null (Description)

Description

Array of objects or null (Translations)

Translations

Responses

Request samples

Content type
application/json
{
  • "discount_id": "49c104c1-008b-4f4f-abbc-6958059cb48b",
  • "brand_image_url": "http://example.com",
  • "brand_logo_url": "http://example.com",
  • "cta_url": "http://example.com",
  • "title": "string",
  • "description": "string",
  • "translations": [
    ]
}

Response samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "shop_slug": "string",
  • "shop_name": "string",
  • "discount_id": "49c104c1-008b-4f4f-abbc-6958059cb48b",
  • "brand_image_url": "http://example.com",
  • "brand_logo_url": "http://example.com",
  • "cta_url": "http://example.com",
  • "title": "string",
  • "description": "string",
  • "rank": 0,
  • "discount": {
    },
  • "translations": [
    ]
}

Delete Deal

Delete a deal for a shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

deal_id
required
string (Deal Id)

The ID of the deal

Responses

Response samples

Content type
application/json
{
  • "errors": [ ],
  • "key": "shop_not_found",
  • "message": "Shop not found",
  • "type": "api_error"
}

Announcement

Create Announcement

Create an announcement if it does not exist.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
text
required
string (Text)

Announcement text

language
required
string (LanguageEnum)
Enum: "cs" "da" "nl" "en" "fi" "fr" "de" "gr" "hu" "it" "lv" "pl" "pt" "sk" "es" "sv"

Language for the text strings related to the merchant

Responses

Request samples

Content type
application/json
{
  • "text": "We are expecting significant delays in today's deliveries due to the storm",
  • "language": "cs"
}

Response samples

Content type
application/json
null

Search Announcements

Search all announcements or based on some values to filter.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

query Parameters
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30
uuid
required
string <uuid> (Uuid)
text
required
string (Text)
language
string or null (LanguageEnum)
Enum: "cs" "da" "nl" "en" "fi" "fr" "de" "gr" "hu" "it" "lv" "pl" "pt" "sk" "es" "sv"

Supported languages.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete Announcement

Delete an announcement that already exists.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

uuid
required
string <uuid> (Uuid)

The announcement's unique identifier

Responses

Response samples

Content type
application/json
null

Update Announcement

Update an announcement partially or completely.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

uuid
required
string <uuid> (Uuid)

The announcement's unique identifier

Request Body schema: application/json
required
text
string or null (Text)

Announcement text

language
string or null (LanguageEnum)
Enum: "cs" "da" "nl" "en" "fi" "fr" "de" "gr" "hu" "it" "lv" "pl" "pt" "sk" "es" "sv"

Language for the text strings related to the merchant

Responses

Request samples

Content type
application/json
{
  • "text": "We are expecting significant delays in today's deliveries due to the storm",
  • "language": "cs"
}

Response samples

Content type
application/json
null

ABTest

Create A/B Test

Create a new A/B test for campaign optimization.

This endpoint allows to create A/B tests to experiment with different
campaign variants and measure their performance.
Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The shop's unique identifier

Request Body schema: application/json
required
name
required
string (Name)

Name of the AB test

segment
required
string (Segment)

Segment to which the AB test is targeted

campaign_type
required
string (Campaign Type)

Type of campaign being tested

required
Array of objects (Campaigns)

List of campaigns and their allocations

has_holdout
boolean (Has Holdout)
Default: false

Whether to include a holdout group

holdout_percentage
integer or null (Holdout Percentage) [ 0 .. 100 ]

Percentage for the holdout group (0-100)

start_date
string or null <date-time> (Start Date)

Time when the AB test will start

end_date
string or null <date-time> (End Date)

Time when the AB test will end

Responses

Request samples

Content type
application/json
{
  • "name": "Holiday Promotion Test",
  • "segment": "b2b",
  • "campaign_type": "product",
  • "campaigns": [
    ],
  • "has_holdout": false,
  • "holdout_percentage": 10,
  • "start_date": "2024-02-01T00:00:00Z",
  • "end_date": "2024-02-29T23:59:59Z"
}

Response samples

Content type
application/json
{
  • "uuid": "d1e99924-df48-4781-b3ad-ff147d3e70a2",
  • "name": "Holiday Promotion Test",
  • "shop_slug": "shopify-store-1",
  • "segment": "b2b",
  • "campaign_type": "product",
  • "campaigns": [
    ],
  • "has_holdout": false,
  • "holdout_percentage": 10,
  • "start_date": "2024-01-15T10:00:00Z",
  • "end_date": "2024-02-15T10:00:00Z",
  • "created_at": "2024-01-15T10:00:00Z",
  • "updated_at": "2024-01-15T14:30:00Z"
}

List Ab Tests

List all AB tests for a shop.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The shop's unique identifier

query Parameters
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get A/B Test Details

Retrieve detailed information about a specific A/B test.

**Required permissions**: SuperAdmin role
Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The shop's unique identifier

uuid
required
string <uuid> (Uuid)

The AB test's unique identifier

Responses

Response samples

Content type
application/json
{
  • "uuid": "d1e99924-df48-4781-b3ad-ff147d3e70a2",
  • "name": "Holiday Promotion Test",
  • "shop_slug": "shopify-store-1",
  • "segment": "b2b",
  • "campaign_type": "product",
  • "campaigns": [
    ],
  • "has_holdout": false,
  • "holdout_percentage": 10,
  • "start_date": "2024-01-15T10:00:00Z",
  • "end_date": "2024-02-15T10:00:00Z",
  • "created_at": "2024-01-15T10:00:00Z",
  • "updated_at": "2024-01-15T14:30:00Z"
}

End A/B Test

End an active A/B test and finalize the results.

This action will stop assigning new users to test variants and mark
the test as completed.
Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The shop's unique identifier

uuid
required
string <uuid> (Uuid)

The AB test's unique identifier

Responses

Response samples

Content type
application/json
{
  • "uuid": "d1e99924-df48-4781-b3ad-ff147d3e70a2",
  • "name": "Holiday Promotion Test",
  • "shop_slug": "shopify-store-1",
  • "segment": "b2b",
  • "campaign_type": "product",
  • "campaigns": [
    ],
  • "has_holdout": false,
  • "holdout_percentage": 10,
  • "start_date": "2024-01-15T10:00:00Z",
  • "end_date": "2024-02-15T10:00:00Z",
  • "created_at": "2024-01-15T10:00:00Z",
  • "updated_at": "2024-01-15T14:30:00Z"
}

Webhook

Create Webhook

Create a webhook if it does not exist.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
enabled_events
Array of strings (Enabled Events)
Default: ["*"]

The list of events to enable for this endpoint. ['*'] (the default) indicates that all events are enabled.See webhooks for more details on how to subscribe to our different events.

secret
string or null (Secret) [ 16 .. 64 ] characters

The secret used to generate webhook signatures. If undefined, we will generate one for you.See webhooks for more details on how to validate the webhook request.

description
string or null (Description)

An optional description for the endpoint

status
string (WebhookStatus)
Default: "active"
Enum: "active" "inactive"

The status of the webhook.

url
required
string <uri> (Url) non-empty

The URL of the webhook endpoint

Responses

Request samples

Content type
application/json
{
  • "enabled_events": [
    ],
  • "secret": "41013bd9-9072-42cd-9902-66da38361be9",
  • "description": null,
  • "status": "active",
}

Response samples

Content type
application/json
{
  • "enabled_events": [
    ],
  • "secret": "41013bd9-9072-42cd-9902-66da38361be9",
  • "description": null,
  • "status": "active",
  • "created_at": "2021-01-01T00:00:00Z",
  • "updated_at": "2021-01-01T00:00:00Z",
  • "uuid": "7022541c-62cd-4de3-9fb2-bfdc74bf7834",
  • "shop_slug": "string"
}

Search Webhooks

Search all webhooks or based on some values to filter.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

query Parameters
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30
uuid
string or null <uuid> (Uuid)
status
string or null (WebhookStatus)
Enum: "active" "inactive"

Webhook Status Type.

url
string or null <uri> (Url) non-empty

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete Webhook

Delete a webhook that already exists.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

uuid
required
string <uuid> (Uuid)

The webhook's unique identifier

Responses

Response samples

Content type
application/json
null

Update Webhook

Update a webhook partially or completely.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

uuid
required
string <uuid> (Uuid)

The webhook's unique identifier

Request Body schema: application/json
required
description
string or null (Description)

An optional description for the endpoint

status
string or null (WebhookStatus)
Enum: "active" "inactive"

The status of the webhook.

url
string or null <uri> (Url) non-empty

The URL of the webhook endpoint

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
null

Shopify

Create Shopify Webhook

Create a webhook if it does not exist.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

Request Body schema: application/json
required
webhook_type
required
string (ShopifyWebhookType)
Enum: "order-creation" "order-fulfillment" "order-partial-fulfillment" "order-update" "order-cancelled" "order-fulfillment-update" "product-creation" "product-update" "product-deletion"

Webhook Type

Responses

Request samples

Content type
application/json
{
  • "webhook_type": "order-creation"
}

Response samples

Content type
application/json
{
  • "webhook_type": "order-creation",
  • "created_at": "2024-01-15T10:30:00Z",
  • "updated_at": "2024-01-16T14:45:00Z",
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "shop_slug": "string",
  • "name": "string",
  • "shopify_id": 0,
  • "topic": "orders/create",
  • "hook_url": "string",
  • "fields": [
    ]
}

Search Shopify Webhooks

Get a shopify webhooks based on its uuid.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

query Parameters
page
integer (Page) > 0
Default: 1
per_page
integer (Per Page) ( 0 .. 100 ]
Default: 30

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Shopify Webhook By Uuid

Get a shopify webhooks based on its uuid.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

uuid
required
string <uuid> (Uuid)

The Webhook's UUID

Responses

Response samples

Content type
application/json
{
  • "webhook_type": "order-creation",
  • "created_at": "2024-01-15T10:30:00Z",
  • "updated_at": "2024-01-16T14:45:00Z",
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "shop_slug": "string",
  • "name": "string",
  • "shopify_id": 0,
  • "topic": "orders/create",
  • "hook_url": "string",
  • "fields": [
    ]
}

Delete Shopify Webhook By Uuid

Delete a webhook that already exists.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

uuid
required
string <uuid> (Uuid)

The webhook's unique identifier

Responses

Response samples

Content type
application/json
null

Get Shopify Webhook By Type

Get a shopify webhooks based on its type.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

webhook_type
required
string (ShopifyWebhookType)
Enum: "order-creation" "order-fulfillment" "order-partial-fulfillment" "order-update" "order-cancelled" "order-fulfillment-update" "product-creation" "product-update" "product-deletion"

The shopify webhook topic path

Responses

Response samples

Content type
application/json
{
  • "webhook_type": "order-creation",
  • "created_at": "2024-01-15T10:30:00Z",
  • "updated_at": "2024-01-16T14:45:00Z",
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "shop_slug": "string",
  • "name": "string",
  • "shopify_id": 0,
  • "topic": "orders/create",
  • "hook_url": "string",
  • "fields": [
    ]
}

Delete Shopify Webhook By Type

Delete a webhook that already exists.

Authorizations:
HTTPBasic
path Parameters
slug
required
string (Slug)

The slug identifying the shop

webhook_type
required
string (ShopifyWebhookType)
Enum: "order-creation" "order-fulfillment" "order-partial-fulfillment" "order-update" "order-cancelled" "order-fulfillment-update" "product-creation" "product-update" "product-deletion"

The shopify webhook topic path

Responses

Response samples

Content type
application/json
null