Zwroty

Zarejestruj nowy zwrot (RMZ)

Changed on

Tworzy nowy dokument zwrotu. Wskazówki integracyjne (Skąd wziąć dane): - order_number: ID zamówienia z GET /orders. - status_id lub status: ID z GET /returns_statuses (lub wpisz po prostu typ/nazwę np. "positive", "new"). - source_id lub source: ID lub nazwa z GET /returns_sources. - returned_products[].cart_id: ID pozycji w koszyku zamówienia z GET /orders/{order_id} (tablica carts[].id). Jeśli podasz cart_id, system sam pobierze nazwę, ID produktu, wariantu oraz cenę! - return_number: Opcjonalne pole. Jeśli puste, system wygeneruje automatyczny numer w formacie RMZ{numer}{data}. - term: Opcjonalne pole daty terminu rozpatrzenia. W przypadku braku system ustawi automatycznie +14 dni od daty zwrotu.

post/returns

Request

  • Base URL
    https://demo.sellasist.pl/api/v1
  • URL
    https://demo.sellasist.pl/api/v1/returns
  • Auth
    API key in header apiKey

Request body

order_numberinteger

ID powiązanego zamówienia w Sellasist (z GET /orders)

status_idinteger

ID statusu zwrotu (z GET /returns_statuses)

statusstring

Alternatywnie: typ lub nazwa statusu

source_idinteger

ID źródła zwrotu (z GET /returns_sources)

sourcestring

Alternatywnie: nazwa źródła zwrotu

return_numberstring

Własny numer zwrotu. Jeśli puste, system wygeneruje automatyczny numer RMZ.

external_return_numberstring
datestring

Data zwrotu (Y-m-d H:i:s). W przypadku braku zostanie wstawiona data bieżąca.

user_emailstring email
bankaccountstring

Numer konta bankowego do zwrotu środków

descriptionstring
refund_valuenumber float

Łączna kwota do zwrotu klientowi

refund_datestring date
refund_currencystring
payment_idinteger

ID kanału płatności (z GET /payments)

tracking_numberstring

Numer listu przewozowego przesyłki zwrotnej

additional_tracking_numbersstring
allegro_order_idstring
termstring

Termin na rozpatrzenie zwrotu (format YYYY-MM-DD lub YYYY-MM-DD HH:MM:SS). Jeśli go nie podasz, system ustawi termin 14 dni od daty zwrotu.

accept_datestring

Data przyjęcia zgłoszenia zwrotu (format YYYY-MM-DD HH:MM:SS)

close_datestring

Data ostatecznego zamknięcia zwrotu (format YYYY-MM-DD HH:MM:SS)

weightnumber float
shipment_pricenumber float
shipment_price_returnednumber float
completedinteger

Example request

{
  "order_number": 1234,
  "status_id": 1,
  "source_id": 1,
  "return_number": "RMZ215042024",
  "description": "Klient odstępuje od umowy w terminie 14 dni.",
  "bankaccount": "PL12345678901234567890123456",
  "refund_value": 89.99,
  "refund_currency": "PLN",
  "tracking_number": "603236276201506110294169",
  "sale_doc_data": {
    "name": "Jan",
    "surname": "Kowalski",
    "street": "Kolejowa",
    "home_number": "12",
    "flat_number": "4",
    "postcode": "00-001",
    "city": "Warszawa",
    "phone": "123456789",
    "country": "PL"
  },
  "returned_products": [
    {
      "cart_id": 10214,
      "quantity": 1,
      "quantity_returned": 1,
      "quantity_accepted": 1,
      "unit_price": 89.99,
      "return_value": 89.99,
      "value_returned": 89.99,
      "topic": "Odstąpienie od umowy",
      "description": "Towar nienaruszony",
      "note": "Przyjęto na magazyn główny"
    }
  ]
}

Response

Pomyślnie zarejestrowano zwrot. Zwraca pełny obiekt utworzonego dokumentu (gotowy do natychmiastowego użycia w PUT).

idinteger
datestring
statusstring nullable
status_idinteger nullable
return_numberstring
external_return_numberstring nullable
order_numberinteger nullable

ID powiązanego zamówienia w Sellasist

sourcestring nullable
source_idinteger nullable
descriptionstring
bankaccountstring
shipment_pricenumber float nullable
refund_valuenumber float
refund_datestring nullable
refund_currencystring
payment_idinteger nullable
tracking_numberstring nullable
additional_tracking_numbersstring nullable
allegro_order_idstring nullable
termstring nullable

Termin na rozpatrzenie zwrotu

accept_datestring nullable

Data przyjęcia / zaakceptowania zwrotu

close_datestring nullable

Data zamknięcia zgłoszenia zwrotu

completedinteger
dispatch_datestring nullable

Data nadania przesyłki zwrotnej przez kupującego

dispatch_term_datestring nullable

Termin nadania przesyłki zwrotnej

courierstring nullable

Nazwa kuriera / sposobu wysyłki zwrotu, tak jak w panelu

courier_idinteger nullable

ID sposobu wysyłki w Sellasist; puste, gdy sposób wysyłki zapisano tylko nazwą (np. zgłoszenie z formularza lub z Allegro)

last_payment_status'NEW' | 'WAITING' | 'IN_PROGRESS' | 'SUCCESS' | 'CANCELLED' | 'CANCELED' | 'PARTIAL' nullable

Kod statusu ostatniego zwrotu płatności (obecnie dla zamówień z Allegro)

last_payment_status_textstring nullable

Status ostatniego zwrotu płatności opisowo

returned_valuenumber float

Całkowita zwrócona kwota (produkty i koszt dostawy). Koszt dostawy dotyczy całego zamówienia — nie sumuj tej kwoty między zwrotami jednego zamówienia

Example response

{
  "id": 666,
  "date": "2026-07-20 12:25:43",
  "status": "Zgłoszenie przyjęte",
  "status_id": 1,
  "return_number": "RMZ215042024",
  "external_return_number": "EXT-RET-9921",
  "order_number": 1234,
  "source": "Sklep internetowy",
  "source_id": 1,
  "description": "Klient odstępuje od umowy bez podania przyczyny.",
  "bankaccount": "PL12345678901234567890123456",
  "shipment_price": 12,
  "refund_value": 89.99,
  "refund_date": "2026-07-22",
  "refund_currency": "PLN",
  "payment_id": 3,
  "tracking_number": "603236276201506110294169",
  "additional_tracking_numbers": "603236276201506110294170",
  "allegro_order_id": "9f8a32b1-1234-5678-abcd-09876543210f",
  "term": "2026-08-03 12:25:43",
  "accept_date": "2026-07-21 10:00:00",
  "close_date": "2026-07-22 15:30:00",
  "completed": 1,
  "dispatch_date": "2026-07-22 12:30:00",
  "dispatch_term_date": "2026-07-29 12:30:00",
  "courier": "DHL Przesyłka krajowa",
  "courier_id": 14,
  "last_payment_status": "SUCCESS",
  "last_payment_status_text": "Zrealizowano",
  "returned_value": 43.24,
  "sale_doc_data": {
    "name": "Jan",
    "surname": "Kowalski",
    "street": "Kolejowa",
    "home_number": "12",
    "flat_number": "4",
    "description": "Kod do bramy 1234",
    "postcode": "00-001",
    "city": "Warszawa",
    "phone": "123456789",
    "country": 170,
    "country_code": "PL",
    "company_name": "Firma Sp. z o.o.",
    "company_nip": "1234567890",
    "state": "Mazowieckie"
  },
  "returned_products": [
    {
      "id": 81,
      "cart_id": 10214,
      "product_id": 341,
      "variant_id": 7691,
      "topic": "Odstąpienie od umowy",
      "name": "Koszulka sportowa męska FIT",
      "quantity": 1,
      "quantity_returned": 1,
      "quantity_accepted": 1,
      "unit_price": 89.99,
      "price_total": 89.99,
      "vat": 23,
      "return_value": 89.99,
      "value_returned": 89.99,
      "returned_products_value": 89.99,
      "status": "Przyjęto na stan",
      "status_id": 2,
      "description": "Brak śladów użytkowania",
      "note": "Zwrot przyjęty na magazyn główny"
    }
  ],
  "payment_log": [
    {
      "id": 88412,
      "date": "2026-10-05 12:30:00",
      "payment_data": "a1b2c3d4-5678",
      "name": "Zwrot płatności (dostawa)",
      "payment_id": null,
      "amount": 14.99,
      "currency": "PLN",
      "completed": false,
      "outgoing": false,
      "refund_status": "SUCCESS",
      "refund_status_text": "Zrealizowano",
      "return_id": 1532
    },
    {
      "id": 88107,
      "date": "2026-10-01 10:00:00",
      "payment_data": "PAY-7781",
      "name": "Przelew online",
      "payment_id": 5,
      "amount": 149.99,
      "currency": "PLN",
      "completed": true,
      "outgoing": false,
      "refund_status": null,
      "refund_status_text": null,
      "return_id": null
    }
  ],
  "shipping": {
    "shipment_method": "Kurier DPD",
    "shipment_method_id": 7,
    "return_shipment_status": "IN_TRANSIT",
    "return_shipment_status_text": "Przesyłka jest w drodze."
  }
}

Changes

    • breaking

      the response property became nullable for the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      endpoint added