SalesChannelCancellationPlans

Create payment plan for cancellation

post

Creates a payment plan for a cancellation plan in the sales channel

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
idintegerRequired

Unique identifier of the resource

Example: 1
Body
Responses
200
Successfully created payment plan
application/json
Responseobject
post
POST /api/channel/{channel_id}/cancellation_plans/{id}/create_payment_plan HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 90

{
  "payment_plan": [
    {
      "transaction_type": "refund",
      "order_items": [
        1,
        2
      ],
      "refund_amount": 99.99
    }
  ]
}
{}

Get cancellation plans that need to be inserted or updated

get

Returns a list of cancellation plans inserted or updated in the sales channel

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
Query parameters
pageinteger · min: 1Optional

Specifies the page number of the current dataset

Default: 1
limitinteger · min: 1Optional

Indicates the number of rows on the current page.

Default: 10
plan_typestring · enumOptional

Type of cancellation plan

Example: cancelPossible values:
cancellation_plan_statusstring · enumOptional

Status of the cancellation plan

Example: waitingPossible values:
order_idintegerOptional

Order ID

order_numberstringOptional

Filter by order number

Example: ORD123456
channel_typestring · enumOptional

Type of the channel

Example: sales_channelPossible values:
channel_id__ininteger[]Optional

List of sales channel IDs

Example: 1
invoice_numberstringOptional

Invoice number associated with the cancellation plan

Example: INV-123456
created_byintegerOptional

ID of the user who created the cancellation plan

Example: 1
modified_byintegerOptional

ID of the user who last modified the cancellation plan

Example: 1
staff_remote_idstringOptional

Remote ID of the staff member associated with the cancellation plan

Example: 654321
retail_store_remote_idstringOptional

Remote ID of the retail store associated with the cancellation plan

Example: 123456
Responses
200
List of cancellation plans to be inserted or updated
application/json
get
GET /api/channel/{channel_id}/cancellation_plans/inserts_or_updates/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
[
  {
    "created_date": "2025-06-27T10:01:24.040Z",
    "modified_date": "2025-06-27T10:01:24.040Z"
  }
]

Retrieve a cancellation plan

get

Returns a cancellation plan for a sales channel

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
idintegerRequired

Unique identifier of the resource

Example: 1
Responses
200
Cancellation plan for given ID
application/json
get
GET /api/channel/{channel_id}/cancellation_plans/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "pk": 1,
  "order": {
    "pk": 1,
    "number": "ORDER12345",
    "channel": 1,
    "customer": 1,
    "date_placed": "2024-11-20T11:22:23.702774Z",
    "extra_field": {
      "special_note": "Handle with care"
    },
    "payment_option": 1,
    "payment_option_slug": "credit-card",
    "bin_number": "123456",
    "installment": 1,
    "installment_count": 6,
    "installment_interest_amount": 50,
    "cargo_company": 1,
    "is_send": false,
    "delivery_type": "next_day",
    "cancellation_info": {
      "reason": "Customer requested cancellation"
    },
    "cancel_status": "cancelled",
    "shipping_interest_amount": 10,
    "external_status": 1,
    "client_type": "default",
    "carrier_shipping_code": "TRACK12345",
    "segment": "premium",
    "checkout_provider_id": 12345,
    "status": 200,
    "currency": "try",
    "amount": 1000,
    "discount_amount": 50,
    "shipping_amount": 20,
    "shipping_tax_rate": 18,
    "refund_amount": 100,
    "discount_refund_amount": 10,
    "shipping_refund_amount": 5,
    "invoice_number": "INV123456",
    "invoice_date": "2024-11-21T11:22:23.702774Z",
    "e_archive_url": "https://earchive.example.com/invoice/123",
    "tracking_number": "TRACK12345",
    "defined_tracking_url": "https://tracking.example.com/track/123",
    "shipping_company": "yurtici",
    "remote_addr": "192.168.0.1",
    "has_gift_box": false,
    "gift_box_note": "Happy Birthday!",
    "language_code": "en",
    "notes": "Leave at the front door.",
    "delivery_range": {
      "start": "2025-06-27T10:01:24.040Z",
      "end": "2025-06-27T10:01:24.040Z"
    },
    "shipping_option_slug": "standard-shipping",
    "created_date": "2025-06-27T10:01:24.040Z",
    "modified_date": "2025-06-27T10:01:24.040Z"
  },
  "invoice_number": "text",
  "order_previous_status": "cancellation_waiting",
  "shipping_refund_amount": 5,
  "status": "waiting",
  "retail_store_remote_id": "123456",
  "refund_amount": 10,
  "discount_refund_amount": 2,
  "plan_type": "cancel",
  "cancellationplanorderitem_set": [
    {
      "pk": 1,
      "order_item": {
        "pk": 1,
        "order": {
          "pk": 1,
          "number": "ORDER12345",
          "channel": 1,
          "customer": 1,
          "date_placed": "2024-11-20T11:22:23.702774Z",
          "extra_field": {
            "special_note": "Handle with care"
          },
          "payment_option": 1,
          "payment_option_slug": "credit-card",
          "bin_number": "123456",
          "installment": 1,
          "installment_count": 6,
          "installment_interest_amount": 50,
          "cargo_company": 1,
          "is_send": false,
          "delivery_type": "next_day",
          "cancellation_info": {
            "reason": "Customer requested cancellation"
          },
          "cancel_status": "cancelled",
          "shipping_interest_amount": 10,
          "external_status": 1,
          "client_type": "default",
          "carrier_shipping_code": "TRACK12345",
          "segment": "premium",
          "checkout_provider_id": 12345,
          "status": 200,
          "currency": "try",
          "amount": 1000,
          "discount_amount": 50,
          "shipping_amount": 20,
          "shipping_tax_rate": 18,
          "refund_amount": 100,
          "discount_refund_amount": 10,
          "shipping_refund_amount": 5,
          "invoice_number": "INV123456",
          "invoice_date": "2024-11-21T11:22:23.702774Z",
          "e_archive_url": "https://earchive.example.com/invoice/123",
          "tracking_number": "TRACK12345",
          "defined_tracking_url": "https://tracking.example.com/track/123",
          "shipping_company": "yurtici",
          "remote_addr": "192.168.0.1",
          "has_gift_box": false,
          "gift_box_note": "Happy Birthday!",
          "language_code": "en",
          "notes": "Leave at the front door.",
          "delivery_range": {
            "start": "2025-06-27T10:01:24.040Z",
            "end": "2025-06-27T10:01:24.040Z"
          },
          "shipping_option_slug": "standard-shipping",
          "created_date": "2025-06-27T10:01:24.040Z",
          "modified_date": "2025-06-27T10:01:24.040Z"
        },
        "product": {
          "id": 1,
          "name": "text",
          "base_code": "text",
          "sku": "text",
          "uuid": "550e8400-e29b-41d4-a716-446655440000",
          "description": "text",
          "brand": 1,
          "erp_categories": [
            1
          ],
          "tax_rate": 1,
          "weight": 1,
          "product_type": "pre_product",
          "productization_date": "2025-06-27T10:01:24.040Z",
          "data_source": 1,
          "created_date": "2025-06-27T10:01:24.040Z",
          "modified_date": "2025-06-27T10:01:24.040Z",
          "is_active": true,
          "attribute_set": 1,
          "parent": 1,
          "group_products": [
            1
          ],
          "attributes": {
            "ANY_ADDITIONAL_PROPERTY": "anything"
          },
          "listing_code": "text",
          "is_seller_product": false,
          "custom_attribute_set": 1
        },
        "price_list": {
          "pk": 1,
          "name": "Standard Price List",
          "code": "shop_price_list",
          "currency": "try",
          "is_auto_sync": true,
          "created_date": "2025-06-27T10:01:24.040Z",
          "modified_date": "2025-06-27T10:01:24.040Z"
        },
        "stock_list": {
          "pk": 1,
          "name": "text",
          "code": "text",
          "is_auto_sync": false,
          "created_date": "2025-06-27T10:01:24.040Z",
          "modified_date": "2025-06-27T10:01:24.040Z"
        },
        "status": "waiting",
        "price_currency": "try",
        "price": 100,
        "tax_rate": 18,
        "shipping_company": "yurtici",
        "shipment_code": "text",
        "cancel_status": "waiting",
        "is_tradable": true,
        "installment_interest_amount": 1,
        "benefitapplicant_set": [
          {
            "created_date": "2025-06-27T10:01:24.040Z",
            "modified_date": "2025-06-27T10:01:24.040Z"
          }
        ],
        "external_status": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "name": "text",
          "code": "text"
        },
        "datasource": {
          "pk": 1,
          "name": "Example Data Source",
          "slug": "example-data-source",
          "stock_list": 1,
          "price_list": 1,
          "is_active": true,
          "token": "text",
          "conf": {},
          "commission": 5,
          "maturity": 1,
          "supplier_code": "text",
          "supplier_detail": {},
          "easy_return_detail": {},
          "extras": {},
          "data_source_type": "unified",
          "created_date": "2025-06-27T10:01:24.040Z",
          "modified_date": "2025-06-27T10:01:24.040Z"
        },
        "tracking_url": "https://example.com",
        "shipping_option_group": {
          "pk": 1,
          "amount": 0,
          "tax_rate": 18,
          "shipping_option_slug": "text",
          "created_date": "2025-06-27T10:01:24.040Z",
          "modified_date": "2025-06-27T10:01:24.040Z"
        },
        "forced_refund": true,
        "extra_field": {},
        "created_date": "2025-06-27T10:01:24.040Z",
        "modified_date": "2025-06-27T10:01:24.040Z",
        "attributes": {
          "key1": "value1",
          "key2": "value2"
        },
        "attributes_kwargs": {
          "key1": "value1",
          "key2": "value2"
        },
        "localized_attributes": {
          "name": {
            "en": "English",
            "es": "Spanish"
          }
        },
        "localized_attributes_kwargs": {
          "key": {
            "key1": "value1",
            "key2": "value2"
          }
        }
      },
      "order_item_previous_status": "cancellation_waiting",
      "status": "waiting",
      "reason": {
        "pk": 1,
        "cancellation_type": "cancel",
        "extra_information_needed": false,
        "order": 100,
        "subject": "text",
        "is_active": true,
        "send_to_remote": true,
        "translations": {},
        "uuid": "text",
        "created_date": "2025-06-27T10:01:24.040Z",
        "modified_date": "2025-06-27T10:01:24.040Z"
      },
      "modified_date": "2023-10-01T12:00:00Z"
    }
  ],
  "staff_remote_id": "654321",
  "created_by": {
    "pk": 1,
    "username": "johndoe",
    "first_name": "John",
    "last_name": "Doe",
    "email": "[email protected]",
    "is_active": true,
    "is_staff": false,
    "is_superuser": false,
    "date_joined": "2023-10-01T12:00:00Z",
    "last_login": "2023-10-01T12:00:00Z",
    "groups": [
      1
    ],
    "can_read_sensitive_data": false,
    "created_date": "2025-06-27T10:01:24.040Z",
    "modified_date": "2025-06-27T10:01:24.040Z"
  },
  "last_updated_by": {
    "pk": 1,
    "username": "johndoe",
    "first_name": "John",
    "last_name": "Doe",
    "email": "[email protected]",
    "is_active": true,
    "is_staff": false,
    "is_superuser": false,
    "date_joined": "2023-10-01T12:00:00Z",
    "last_login": "2023-10-01T12:00:00Z",
    "groups": [
      1
    ],
    "can_read_sensitive_data": false,
    "created_date": "2025-06-27T10:01:24.040Z",
    "modified_date": "2025-06-27T10:01:24.040Z"
  },
  "payment_plan": {},
  "modified_by_id": 1,
  "created_date": "2025-06-27T10:01:24.040Z",
  "modified_date": "2025-06-27T10:01:24.040Z"
}

Get cancellation plans that need to be updated

get

Returns a list of cancellation plans that updated in the sales channel

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
Query parameters
pageinteger · min: 1Optional

Specifies the page number of the current dataset

Default: 1
limitinteger · min: 1Optional

Indicates the number of rows on the current page.

Default: 10
plan_typestring · enumOptional

Type of cancellation plan

Example: cancelPossible values:
cancellation_plan_statusstring · enumOptional

Status of the cancellation plan

Example: waitingPossible values:
order_idintegerOptional

Order ID

order_numberstringOptional

Filter by order number

Example: ORD123456
channel_typestring · enumOptional

Type of the channel

Example: sales_channelPossible values:
channel_id__ininteger[]Optional

List of sales channel IDs

Example: 1
invoice_numberstringOptional

Invoice number associated with the cancellation plan

Example: INV-123456
created_byintegerOptional

ID of the user who created the cancellation plan

Example: 1
modified_byintegerOptional

ID of the user who last modified the cancellation plan

Example: 1
staff_remote_idstringOptional

Remote ID of the staff member associated with the cancellation plan

Example: 654321
retail_store_remote_idstringOptional

Remote ID of the retail store associated with the cancellation plan

Example: 123456
Responses
200
List of cancellation plans to be updated
application/json
get
GET /api/channel/{channel_id}/cancellation_plans/updates/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
[
  {
    "created_date": "2025-06-27T10:01:24.040Z",
    "modified_date": "2025-06-27T10:01:24.040Z"
  }
]

List cancellation plans for a sales channel

get

Returns a list of cancellation plans for a sales channel

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
Query parameters
pageinteger · min: 1Optional

Specifies the page number of the current dataset

Default: 1
limitinteger · min: 1Optional

Indicates the number of rows on the current page.

Default: 10
plan_typestring · enumOptional

Type of cancellation plan

Example: cancelPossible values:
cancellation_plan_statusstring · enumOptional

Status of the cancellation plan

Example: waitingPossible values:
order_idintegerOptional

Order ID

order_numberstringOptional

Filter by order number

Example: ORD123456
channel_typestring · enumOptional

Type of the channel

Example: sales_channelPossible values:
channel_id__ininteger[]Optional

List of sales channel IDs

Example: 1
invoice_numberstringOptional

Invoice number associated with the cancellation plan

Example: INV-123456
created_byintegerOptional

ID of the user who created the cancellation plan

Example: 1
modified_byintegerOptional

ID of the user who last modified the cancellation plan

Example: 1
staff_remote_idstringOptional

Remote ID of the staff member associated with the cancellation plan

Example: 654321
retail_store_remote_idstringOptional

Remote ID of the retail store associated with the cancellation plan

Example: 123456
Responses
200
Successful response
application/json
get
GET /api/channel/{channel_id}/cancellation_plans/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "count": 1,
  "next": "https://example.com",
  "previous": "https://example.com",
  "results": [
    {
      "created_date": "2025-06-27T10:01:24.040Z",
      "modified_date": "2025-06-27T10:01:24.040Z"
    }
  ]
}

Get cancellation plans that need to be inserted

get

Returns a list of cancellation plans that needs to be inserted in the sales channel

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
Query parameters
pageinteger · min: 1Optional

Specifies the page number of the current dataset

Default: 1
limitinteger · min: 1Optional

Indicates the number of rows on the current page.

Default: 10
plan_typestring · enumOptional

Type of cancellation plan

Example: cancelPossible values:
cancellation_plan_statusstring · enumOptional

Status of the cancellation plan

Example: waitingPossible values:
order_idintegerOptional

Order ID

order_numberstringOptional

Filter by order number

Example: ORD123456
channel_typestring · enumOptional

Type of the channel

Example: sales_channelPossible values:
channel_id__ininteger[]Optional

List of sales channel IDs

Example: 1
invoice_numberstringOptional

Invoice number associated with the cancellation plan

Example: INV-123456
created_byintegerOptional

ID of the user who created the cancellation plan

Example: 1
modified_byintegerOptional

ID of the user who last modified the cancellation plan

Example: 1
staff_remote_idstringOptional

Remote ID of the staff member associated with the cancellation plan

Example: 654321
retail_store_remote_idstringOptional

Remote ID of the retail store associated with the cancellation plan

Example: 123456
Responses
200
List of cancellation plans to be inserted
application/json
get
GET /api/channel/{channel_id}/cancellation_plans/inserts/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
[
  {
    "created_date": "2025-06-27T10:01:24.040Z",
    "modified_date": "2025-06-27T10:01:24.040Z"
  }
]

Update cancellation plan status

post

Updates the status of a cancellation plan in the sales channel

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
idintegerRequired

Unique identifier of the resource

Example: 1
Body
statusstring · enumOptional

Status of the cancellation plan

Example: waitingPossible values:
Responses
200
Cancellation plan status updated successfully
application/json
Responseobject
post
POST /api/channel/{channel_id}/cancellation_plans/{id}/update_status/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 20

{
  "status": "waiting"
}
{}

Was this helpful?