Project

The Project endpoint is used to retrieve certain information from a project.

The Endpoint is responding a limited set of information about settings and configuration of the project.

Representations

Project

  • version - Number
    The current version of the project.
  • key - String
    The unique key of the project.
  • name - String
    The name of the project.
  • countries - Array of Strings
    A two-digit country code as per ↗ ISO 3166-1 alpha-2 .
  • currencies - Array of Strings
    A three-digit currency code as per ↗ ISO 4217 .
  • languages - Array of Strings
    ↗ IETF language tag .
  • createdAt - DateTime
  • trialUntil - String - Optional
    The time is in the format Year-Month YYYY-MM.
  • messages - MessagesConfiguration
  • shippingRateInputType - ShippingRateInputType - Optional

Messages Configuration

This object is used to configure the Messages Query HTTP API feature for the project.

  • enabled - Boolean
    When true the creation of messages on the Messages Query HTTP API is enabled.
  • deleteDaysAfterCreation - Number - Optional, defaults to 15 Specifies after how many days messages will be deleted from the Messages Query HTTP API. Must not be larger than 90 days. Optional for backwards compatibility reasons only.

Messages Configuration Draft

In the draft of the Messages Configuration, deleteDaysAfterCreation is required.

  • enabled - Boolean
  • deleteDaysAfterCreation - Number

ShippingRateInputType

There are three ways to dynamically select a ShippingRatePriceTier. The CartValue type uses the sum of all line item prices, whereas CartClassification and CartScore use the shipppingRateInput field on the cart to select a tier.

CartValue

  • type - String - "CartValue"

Cart Value is used when the shipping rate maps to the sum of the line item prices.

The value of the cart is used to select a tier. If chosen, it is not possible to set a value for the shippingRateInput on the cart. Tiers contain the centAmount (a value of 100 in the currency USD corresponds to $ 1.00), and start at 1.

CartClassification

Cart Classification is used when the shipping rate maps to an abstract cart categorization expressed through a string, e.g. green, yellow, red or light, medium, heavy.

Only a key defined inside the values array can be used to create a tier, or to set a value for the shippingRateInput on the cart. The keys are checked for uniqueness and the request is rejected if keys are not unique.

Here is an example of a "ShippingRateInputType" of type "CartClassification":

{
  "shippingRateInputType": {
    "type": "CartClassification",
    "values": [
      { "key": "Small", "label": { "en": "Small", "de": "Klein" } },
      { "key": "Medium", "label": { "en": "Medium", "de": "Mittel" } },
      { "key": "Heavy", "label": { "en": "Heavy", "de": "Schwergut" } }
    ]
  }
}

CartScore

  • type - String - "CartScore"

Cart Score is used when the shipping rate maps to an abstract cart categorization expressed through an integer, e.g. shipping score or weight ranges.

The range starts at 0. The default price covers the 0, tiers start at 1.

Get Project

Endpoint: /{projectKey}
Method: GET
OAuth2 Scopes: view_project_settings:{projectKey}
Response Representation: Project

Update Project

Endpoint: /{projectKey}
Method: POST
OAuth2 Scopes: manage_project:{projectKey}
Response Representation: Project
Fields:

  • version - Number - Required
    The expected version of the project on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.
  • actions - Array of UpdateAction - Required
    The list of update actions to be performed on the project.

Update Actions
Please find below the individual update actions provided on this endpoint.


Change Name

  • action - String - "changeName"
  • name - String - Required

Change Currencies

  • action - String - "changeCurrencies"
  • currencies - Array of Strings
    A three-digit currency code as per ↗ ISO 4217 .

A project needs at least one currency.

Change Countries

  • action - String - "changeCountries"
  • countries - Array of Strings
    A two-digit country code as per ↗ ISO 3166-1 alpha-2 .

Change Languages

A project needs at least one language.

Change Messages Configuration

Set ShippingRateInputType