Voog.com

Delivery provider configurations

Summary of delivery provider configuration endpoints

List all delivery provider configurations for the current site

Get list of delivery provider configurations.

GET /admin/api/ecommerce/v1/delivery_provider_configs

Example response:

Status: 200 OK
[
  {
    "id": 19,
    "code": "itella",
    "updated_at": "2023-01-06T12:32:32Z",
    "enabled": true,
    "config": {
      "api_key": "api_key",
      "secret_key": "secret_key",
      "phone": "12345678"
    },
    "created_at": "2023-01-06T12:32:32Z"
  },
  {
    "id": 20,
    "code": "omniva",
    "updated_at": "2023-01-09T15:39:56Z",
    "enabled": true,
    "config": {
      "partner_code": "012345",
      "password": "password",
      "sandbox": true,
      "phone": "12345678"
    },
    "created_at": "2023-01-09T15:39:56Z"
  }
]

List attributes of a delivery provider configuration

GET /admin/api/ecommerce/v1/delivery_provider_configs/1

Example request:

GET http://helloworld.voog.com/admin/api/ecommerce/v1/delivery_provider_configs/1

Example response:

Status: 200 OK
{
  "id": 19,
  "code": "itella",
  "updated_at": "2023-01-06T12:32:32Z",
  "enabled": true,
  "config": {
    "api_key": "api_key",
    "secret_key": "secret_key",
    "phone": "12345678"
  },
  "created_at": "2023-01-06T12:32:32Z"
}

Create a new delivery provider configuration for the current site

POST /admin/api/ecommerce/v1/delivery_provider_configs

Example data:

{
  "code": "itella",
  "enabled": true,
  "config": {
    "api_key": "api_key",
    "secret_key": "secret_key",
    "phone": "12345678"
  }
}

Example response:

Status: 201 Created
{
  "id": 19,
  "code": "itella",
  "updated_at": "2023-01-06T12:32:32Z",
  "enabled": true,
  "config": {
    "api_key": "api_key",
    "secret_key": "secret_key",
    "phone": "12345678"
  },
  "created_at": "2023-01-06T12:32:32Z"
}

Parameters

  • enabled — Flag switching the delivery provider configuration on or off, true by default.
  • code — The delivery provider to configure, either itella (Itella) or omniva (Omniva).
  • config — Provider-specific configuration:
    • Itella
    • api_key — Itella account API key.
    • secret_key — Itella account secret key.
    • phone — Sender's phone number used for Itella shipments.
    • Omniva
    • sandbox — Flag indicating if requests should be made to the sandbox environment.
    • partner_code — Omniva partner code.
    • password — Omniva account password.
    • phone — Sender's phone number used for Omniva shipments.

Update attributes of a delivery provider configuration

PUT /admin/api/ecommerce/v1/delivery_provider_configs/1

This request updates the delivery provider configuration with the provided attributes.

Example request:

PUT http://helloworld.voog.com/admin/api/ecommerce/v1/delivery_provider_configs/1

Example data:

{
  "config": {
    "api_key": "api_key",
    "secret_key": "secret_key",
    "phone": "12345678"
  },
}

Example response:

Status: 200 OK
{
  "id": 19,
  "code": "itella",
  "updated_at": "2023-01-06T14:35:12Z",
  "enabled": true,
  "config": {
    "api_key": "api_key",
    "secret_key": "secret_key",
    "phone": "12345678"
  },
  "created_at": "2023-01-06T12:32:32Z"
}

Parameters

  • enabled — Flag switching the delivery provider configuration on or off, true by default.
  • code — The delivery provider to configure, either itella (Itella) or omniva (Omniva).
  • config — Provider-specific configuration:
    • Itella
    • api_key — Itella account API key.
    • secret_key — Itella account secret key.
    • phone — Sender's phone number used for Itella shipments.
    • Omniva
    • sandbox — Flag indicating if requests should be made to the sandbox environment.
    • partner_code — Omniva partner code.
    • password — Omniva account password.
    • phone — Sender's phone number used for Omniva shipments.

Remove a delivery provider configuration

DELETE /admin/api/ecommerce/v1/delivery_provider_configs/1

This request deletes the given delivery provider configuration.

Example request:

DELETE http://helloworld.voog.com/admin/api/ecommerce/v1/delivery_provider_configs/1

Example response:

Status: 204 No Content