API documentation
Method list
Test your request
Changelog


setOrderReturnFields
The method allows you to edit selected fields of a specific order return. Only the fields that you want to edit should be given, other fields can be omitted in the request.


Input parameters
return_idintOrder return identifier. Field required. Other fields are optional.
admin_commentsvarchar(200)Seller comments
emailvarchar(150)Buyer e-mail address
phonevarchar(100)Buyer phone number
user_loginvarchar(30)Buyer login
delivery_pricefloatGross delivery price
delivery_fullnamevarchar(100)Delivery address - name and surname
delivery_companyvarchar(100)Delivery address - company
delivery_addressvarchar(100)Delivery address - street and number
delivery_postcodevarchar(100)Delivery address - postcode
delivery_cityvarchar(100)Delivery address - city
delivery_statevarchar(100)Delivery address - state/province
delivery_country_codechar(2)Delivery address - country code (two-letter, e.g. EN)
extra_field_1varchar(50)Value of the "extra field 1".
extra_field_2varchar(50)Value of the "extra field 2".
custom_extra_fieldsarrayA list containing order return custom extra fields, where the key is the extra field ID and value is an extra field content for given extra field. The list of extra fields can be retrieved with getOrderReturnExtraFields method.
In case of removing a field the empty string is expected.
In case of file the following format is expected:
{
    "title": "file.pdf" (varchar(40) - the file name)
    "file": "data:4AAQSkZJRgABA[...]" (binary - the file body limited to 2MB)
}



Output data
The method returns the data in JSON format.
statusvarchar(30)SUCCESS - request executed correctly
ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code



Sample
Input data:
Output data:
A sample request in PHP: