Managing Tickets

Tickets are issues related to orders that have been raised either by the buyer or the seller. They are always bound to order units (for more information about orders and order units, see the Managing Orders page). Once a ticket has been opened, the seller, the buyer or the customer service communicate with each other through sending messages.

Note: Tickets are the new version of Claims (deprecated). The main difference is, that a ticket has a N-to-N relation with order units. This means that a ticket can include multiple order units and an order unit can have multiple tickets, whereas a claim could only hold one order unit.

Retrieving Open Tickets

You can retrieve the unresolved tickets on your sales by sending a GET request to the /tickets/seller/ endpoint with the status=opened query parameter. The is_seller_responsible flag indicates that the customer is waiting for you to respond. When it is set to true and you write a message for the ticket, this flag will automatically be changed to false, indicating that you have done everything you can and now you're waiting for a response or reaction from the customer.

Example output:

[
	  {
	    "id_ticket": "0013163664",
	    "ids_order_unit": [
	      "314567843663060"
	    ],
	    "id_buyer": 22336210,
	    "ts_created": "2017-04-10 11:41:56",
	    "ts_updated": "2017-04-10 11:41:56",
	    "status": "opened",
	    "open_reason": "product_not_as_described",
		"topic": "order_cancel"
	    "callback_phone": "0221454657",
	    "is_seller_responsible": true
	  }
]

Responding To A Ticket

If you want to respond to a ticket, you only need the id_ticket of the related ticket. Then you should send a POST request to the /ticket-messages/ endpoint giving id_ticket in the request body.

For example, to send a message to the buyer who opened ticket #2308211 with the reason product_not_delivered:

POST https://www.real.de/api/v1/ticket-messages/

Request body:

{
	"id_ticket": "0012308211",
	"text": "I'm sorry you did not receive the item you ordered. I will ship another one immediately."
}

By default, sending a message will flip the is_seller_responsible flag to indicate that you have done everything you can and you are now waiting for a response or reaction from the customer. However, sometimes you just want to tell the customer that you are working on the issue, but you're not done yet. For these situations, you can suppress the automatic behavior by adding the "interim_notice": true property to your request. If you do, the is_seller_responsible flag will stay in the true state, indicating that you will follow up with another message.

For example, if you send a message for the ticket #2308212 for which the is_seller_responsible flag indicates that you should respond, the flag will not be changed by sending a message with the following request:

POST https://www.real.de/api/v1/ticket-messages/

Request body:

{
	"id_ticket": "0012308212",
	"text": "Just to inform you: I have received your return and I am working on it.",
	"interim_notice": true
}

If you'd like to attach one or more files to your ticket message, you can do so by adding an claim_message_files array to the request. Each of the files has to have a name, the correct mime_type and the corresponding data encoded in base64. No additional API parameters required:

POST https://www.real.de/api/v1/ticket-messages/

{
	"id_ticket": "0012308212",
	"text": "Just to inform you: I have received your return and I am working on it.",
	"interim_notice": true,
	"claim_message_files": [
        {
			"filename": "Testfile.txt"
			"mime_type": "text/plain"
			"data": "some_base64_data"
		}
		...
    ]
}

Closing A Ticket

You can close a ticket by sending a PATCH request to the /ticket/{id_ticket}/close/ endpoint.

Example:

PATCH https://www.real.de/api/v1/tickets/2308211/close/

Opening A Ticket

You can open a ticket for one or multiple order units by sending a POST request to the /tickets/ endpoint. A ticket can only be opened for order units belonging to the same order.

Example: Opening a ticket for two order units. (assuming they belong to the same order)

POST https://www.real.de/api/v1/tickets/

{
	"id_order_unit": [
				314567849803494,
				314567849803495,
			],
	"reason": "product_return",
	"message": "An article was missing in your return."
   }

Allowed values for the field reason are: