Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Partially update an easy return shipping company

Updates one or more fields of an easy return shipping company. Only the fields included in the request body are changed.

The uniqueness check still runs: the carrier and rules the record ends up with must not match another record. Sending only rules therefore checks the new rules against the stored carrier, and sending only shipping_company checks the new carrier against the stored rules.

patch
/easy_return_shipping_companies/{id}/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Path parameters
idintegerRequired

The unique identifier of the easy return shipping company.

Body

Request body for partially updating an easy return shipping company. Send only the fields you want to change; every field is optional and omitted fields keep their stored values.

The length limits on prefix and name are applied when the record is stored rather than during request validation, so a longer value prevents the record from being saved.

shipping_companystringOptional

Carrier code, sent in lower case. Codes are case-sensitive.

Example: ups
prefixstring · max: 6Optional

Prefix added to the return codes issued for this carrier. May be an empty string.

Example: RET
namestring · max: 128Optional

Name used to tell records of the same carrier apart. May be an empty string.

is_activebooleanOptional

Whether the carrier is offered for return collection.

start_date_gapintegerOptional

Number of days after a return code is issued before its collection window opens.

durationintegerOptional

Number of days the collection window stays open.

Responses
200

The updated easy return shipping company.

application/json

An easy return shipping company returned by the API.

pkintegerRead-onlyRequired

Unique identifier of the easy return shipping company.

is_activebooleanRequired

Whether the carrier is offered for return collection. Deactivated records are retained and still listed.

Default: true
start_date_gapintegerRequired

Number of days after a return code is issued before its collection window opens. 0 means the code is valid immediately.

Default: 0Example: 0
durationintegerRequired

Number of days the collection window stays open, counted from its start.

Default: 14Example: 14
prefixstring · max: 6Required

Prefix added to the return codes issued for this carrier. May be an empty string.

Example: RET
namestring · max: 128 · nullableRequired

Name used to tell records of the same carrier apart. May be an empty string.

Example: UPS — Oversized Items
patch/easy_return_shipping_companies/{id}/
PATCH /api/v1/remote/1/easy_return_shipping_companies/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 270

{
  "shipping_company": "ups",
  "auth": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "prefix": "RET",
  "rules": {
    "package_rule": "product",
    "product": {
      "field_key": "attributes__size",
      "field_values": [
        [
          "XL",
          "L"
        ]
      ]
    },
    "max_count": 5
  },
  "name": "text",
  "is_active": true,
  "start_date_gap": 1,
  "duration": 1
}
{
  "pk": 1,
  "shipping_company": {
    "value": "ups",
    "label": "UPS"
  },
  "auth": {
    "url": "https://carrier.example.com/service",
    "customer_code": "123456",
    "username": "akinon",
    "password": "secret"
  },
  "is_active": true,
  "start_date_gap": 0,
  "duration": 14,
  "prefix": "RET",
  "rules": {
    "package_rule": "product",
    "product": {
      "field_key": "attributes__size",
      "field_values": [
        [
          "XL",
          "L"
        ]
      ]
    },
    "max_count": 5
  },
  "name": "UPS — Oversized Items"
}

Last updated

Was this helpful?