API method
createComplaint
Method allows to create complaint with specific details. Pictures must be uploaded directly ($_FILES).
https://b2b.onesto-energy.pl/api/createComplaint.json?key=YOURAPIKEY
Query params
Put these in your URL, e.g. ?id=123.
-
lang string
Language of result. ISO 2 Letter Language Codes
Example
en, pl, cs
-
test boolean 1 = true, 0 = false
Enables a sandbox mode - no data will be written on the server.
POST data
Change the request to POST and send these fields as form-data.
-
saleid integerrequired
Internal identifier of sale.
-
type integerrequired
Internal identifier of complaint type.
-
productid integerrequired
Internal identifier of product. Required in most cases
-
qty floatrequired
Quantity of products that complaint is about
-
description stringrequired
Description of complaint.
-
bankaccount stringrequired
Bank account number (required for refunds).
-
swift stringrequired
SWIFT (required for refunds)
-
picture1 file upload
File key to upload first picture.
-
picture2 file upload
File key for upload second picture.
-
picture3 file upload
File key for upload third picture.
-
return_address object
Array with return address - if empty (not specified) data will be taken from sale
Nested fields
-
receiver_name stringrequired
Receiver's full name / company name
-
postal_code stringrequired
Receiver's postal code
-
city stringrequired
Receiver's city
-
street stringrequired
Receiver's street
-
home_number stringrequired
Receiver's building number
-
flat_number string
Receiver's flat nummber
-
phone stringrequired
Receiver's phone number
-
email stringrequired
Receiver's email address
-
country stringrequired
Receiver's country - ISO2 code
Example
Two letters format ie: DE, PL, GB, US
-
-
delivery object
Array with delivery details - if empty (not specified) data will be taken from sale
Nested fields
-
fkshipmenttype integerrequired
Shipment type internal identifier
-
pickup_point string
Unique ID of selected delivery point. Only required if fkshipmenttype points at pickup point delivery type
-
Response fields
Fields returned by this method.
-
id integer
Created complaint ID
-
messages object
Generic success or failure message.
Click here for more informationNested fields
-
success string[]
List of success messages
-
danger string[]
List of errors, blocks the operation
-
warning string[]
List of warnings, does not block the operation
-
saleid=112087&
type=3&
productid=40161&
qty=1&
description=Not working&
bankaccount=PL 1234 1234 1234 1234 1234 1234&
swift=XYZ12345
-- Keys below are only for visual purposes on what to use for file transfer
picture0
picture1
picture2
Example URL: https://b2b.onesto-energy.pl/api/createComplaint.json?key=YOURAPIKEY&lang=en
Example URL: https://b2b.onesto-energy.pl/api/createComplaint.xml?key=YOURAPIKEY&lang=en