API method

createComplaint

Method allows to create complaint with specific details.
Pictures must be uploaded directly ($_FILES).

GET
Usage URL
https://hedo-pets.com/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 integer
    required

    Internal identifier of sale.

  • type integer
    required

    Internal identifier of complaint type.

  • productid integer
    required

    Internal identifier of product. Required in most cases

  • qty float
    required

    Quantity of products that complaint is about

  • description string
    required

    Description of complaint.

  • bankaccount string
    required

    Bank account number (required for refunds).

  • swift string
    required

    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 string
      required

      Receiver's full name / company name

    • postal_code string
      required

      Receiver's postal code

    • city string
      required

      Receiver's city

    • street string
      required

      Receiver's street

    • home_number string
      required

      Receiver's building number

    • flat_number string

      Receiver's flat nummber

    • phone string
      required

      Receiver's phone number

    • email string
      required

      Receiver's email address

    • country string
      required

      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 integer
      required

      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 information

    Nested 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

Input POST
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
Response JSON
Example URL: https://hedo-pets.com/api/createComplaint.json?key=YOURAPIKEY&lang=en

Response XML
Example URL: https://hedo-pets.com/api/createComplaint.xml?key=YOURAPIKEY&lang=en