API method

getComplaints

Method returns list of contractor's complaints.

GET
Usage URL
https://b2b.onesto-energy.pl/api/getComplaints.json?key=YOURAPIKEY

Query params

Put these in your URL, e.g. ?id=123.

  • id integer or integer[]

    Internal identifier of complaint.
    More than one value can be specified after comma (,) separator.

  • modified datetime YYYY-MM-DD HH:MM:SS

    Return all sales complaints after the modified param. That is highly recommended when you want to update your local database.

  • name string

    Order name of the complaint.

    Example

    '12' will return all sales that contain 12 in the `name` field.

  • saleid integer or integer[]

    Internal identifier of sale.
    More than one value can be specified after comma (,) separator.

  • productid integer or integer[]

    Internal identifier of product.
    More than one value can be specified after comma (,) separator.

  • complaintstatusid integer or integer[]

    Internal identifier of complaint status.
    More than one value can be specified after comma (,) separator.

  • complaintreasonid integer or integer[]

    Internal identifier of complaint reason.
    More than one value can be specified after comma (,) separator.

  • lang string

    Language of result. ISO 2 Letter Language Codes

    Example

    en, pl, cs

Response fields

Fields returned by this method.

  • id integer

    Internal identifier of complaint.

  • created datetime YYYY-MM-DD HH:MM:SS

    When created.

  • modified datetime YYYY-MM-DD HH:MM:SS

    When last modified.

  • name string

    Name of complaint

  • description string

    Description of complaint.

  • fkproduct integer

    Internal identifier of product. If 0 - then it's about whole sale.

  • productname string

    Name of product.

  • qty integer

    Quantity of product.

  • fksale integer

    Internal identifier of sale.

  • orderno string

    Order number

  • invoiceno string

    Invoice number

  • fkcomplaintstatus integer

    Internal identifier of complaint status.

  • complaintstatusname string

    Name of complaint status.

  • fkcomplainttype integer

    Internal identifier of complaint type.

  • complainttypename string

    Name of complaint type.

  • pictures string or string[]

    URLs of attached pictures.

Response JSON
Example URL: https://b2b.onesto-energy.pl/api/getComplaints.json?key=YOURAPIKEY&lang=en&modified=2016-12-14

Response XML
Example URL: https://b2b.onesto-energy.pl/api/getComplaints.xml?key=YOURAPIKEY&lang=en&modified=2016-12-14