getSales

Method returns sale list

Usage URL: https://magboss.pl/api/getSales.json?key=YOURAPIKEY

Query params

(put those in your URL, e.g. ?id=123)

  • id

    integer or integer[]

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

  • name

    string

    Order name of sale.

    Example: 'Z23' will return all sales that contain Z23 in the `ordername` field.

  • invoicename

    string

    Document (invoice/receipt/correction) name of sale.

    Example: '03' will return all sales that contain 03 in the `invoicename` field.

  • type

    integer or integer[]

    Return all sales with type param.
    More than one value can be specified after comma (,) separator.

  • date

    datetime (YYYY-MM-DD HH:MM:SS)

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

  • modified

    datetime (YYYY-MM-DD HH:MM:SS)

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

  • productid

    integer

    Product ID.

    Example: '51234' will return all sales which have product with ID 51234 inside.

  • isattachable

    boolean (1 = true, 0 = false)

    Return only sales that can be attached to another sale or can be attached to (for example more products can be added).

    Example: If set to true - only attachable sales will be returned, if set to false - only non-attachable sales will be returned.

  • lang

    string

    Language of result. ISO 2 Letter Language Codes ie

    Example: en, pl, cs

  • id

    integer

    Internal identifier of sale.

  • type

    integer

    Type of sale:
    -1 - Order,
    0 - Invoice,
    1 - Invoice correction,
    2 - Receipt,
    3 - Receipt correction,
    5 - Advance invoice,
    10 - Utilization,
    100 - Invoice non-rating

  • created

    datetime (YYYY-MM-DD HH:MM:SS)

    When created

  • modified

    datetime (YYYY-MM-DD HH:MM:SS)

    When last modified

  • ordername

    string

    Name of order

  • invoicename

    string

    Name of assigned financial document

  • statusname

    string

    Current sale status

  • fkcurrency

    integer

    Internal ID of currency

  • symbol

    string

    Sale's currency symbol

    Example: Three letters format ie: PLN, EUR, USD.

  • paid

    float

    Value paid

  • total

    float

    Total net price of sale

  • totalgross

    float

    Total gross price of sale

  • isassembling

    boolean (1 = true, 0 = false)

    Points whether sale is marked as still assembling

  • assemblyend

    datetime (YYYY-MM-DD HH:MM:SS)

    Date when assembling has been finished

  • paymentdeadline

    datetime (YYYY-MM-DD HH:MM:SS)

    Payment deadline

  • paymenttag

    string

    Internal tag of payment type

  • paymenttypeid

    integer

    Payment type internal identifier

  • paymenttypename

    string

    Payment type name

  • isshipped

    boolean (1 = true, 0 = false)

    Points whether sale is shipped

  • isattachable

    boolean (1 = true, 0 = false)

    Points whether sale can be attached to another sale or can be attached to (for example more products can be added)

  • mergedids

    string

    Lists of sales IDs that were merged into this one, comma separated string

Example URL: https://magboss.pl/api/getSales.json?key=YOURAPIKEY&lang=en&modified=2017-02-23

[
    {
        "id": 205430,
        "type": -1,
        "created": "2018-09-28 13:47:28",
        "modified": "2018-09-28 13:47:36",
        "invoicename": "--",
        "ordername": "Z18\/33482",
        "fkcurrency": 1,
        "statusname": "Pending",
        "symbol": "PLN",
        "paid": 0,
        "total": 273.21,
        "totalgross": 336.05,
        "isassembling": 0,
        "assemblyend": null,
        "paymentdeadline": "2018-10-08 13:47:28",
        "paymenttag": "paypal",
        "ispaid": 0,
        "ispacked": 0,
        "isshipped": 0,
        "mergedids": null
    },
    {
        "id": 205431,
        "type": 2,
        "created": "2018-09-28 00:00:00",
        "modified": "2018-09-28 14:24:10",
        "invoicename": "ssss",
        "ordername": "Z18\/33483",
        "fkcurrency": 1,
        "statusname": "Pending",
        "symbol": "PLN",
        "paid": 0,
        "total": 10854.91,
        "totalgross": 13351.54,
        "isassembling": 0,
        "assemblyend": null,
        "paymentdeadline": "2018-10-08 00:00:00",
        "paymenttag": "paypal",
        "ispaid": 0,
        "ispacked": 0,
        "isshipped": 0,
        "mergedids": null
    },
    {
        "id": 205432,
        "type": -1,
        "created": "2018-09-28 13:47:34",
        "modified": "2018-09-28 13:47:36",
        "invoicename": "--",
        "ordername": "Z18\/33484",
        "fkcurrency": 1,
        "statusname": "Pending",
        "symbol": "PLN",
        "paid": 0,
        "total": 54.12,
        "totalgross": 66.57,
        "isassembling": 0,
        "assemblyend": null,
        "paymentdeadline": "2018-10-08 13:47:34",
        "paymenttag": "paypal",
        "ispaid": 0,
        "ispacked": 0,
        "isshipped": 0,
        "mergedids": null
    }
]
Example URL: https://magboss.pl/api/getSales.xml?key=YOURAPIKEY&lang=en&modified=2017-02-23

<?xml version="1.0" encoding="utf-8"?>
<root>
	<item>
		<id>205430</id>
		<type>-1</type>
		<created>2018-09-28 13:47:28</created>
		<modified>2018-09-28 13:47:36</modified>
		<invoicename>--</invoicename>
		<ordername>Z18/33482</ordername>
		<fkcurrency>1</fkcurrency>
		<statusname>Pending</statusname>
		<symbol>PLN</symbol>
		<paid>0</paid>
		<total>273.21</total>
		<totalgross>336.05</totalgross>
		<isassembling>0</isassembling>
		<assemblyend></assemblyend>
		<paymentdeadline>2018-10-08 13:47:28</paymentdeadline>
		<paymenttag>paypal</paymenttag>
		<ispaid>0</ispaid>
		<ispacked>0</ispacked>
		<isshipped>0</isshipped>
		<mergedids></mergedids>
	</item>
	<item>
		<id>205431</id>
		<type>2</type>
		<created>2018-09-28 00:00:00</created>
		<modified>2018-09-28 14:24:10</modified>
		<invoicename>ssss</invoicename>
		<ordername>Z18/33483</ordername>
		<fkcurrency>1</fkcurrency>
		<statusname>Pending</statusname>
		<symbol>PLN</symbol>
		<paid>0</paid>
		<total>10854.91</total>
		<totalgross>13351.54</totalgross>
		<isassembling>0</isassembling>
		<assemblyend></assemblyend>
		<paymentdeadline>2018-10-08 00:00:00</paymentdeadline>
		<paymenttag>paypal</paymenttag>
		<ispaid>0</ispaid>
		<ispacked>0</ispacked>
		<isshipped>0</isshipped>
		<mergedids></mergedids>
	</item>
	<item>
		<id>205432</id>
		<type>-1</type>
		<created>2018-09-28 13:47:34</created>
		<modified>2018-09-28 13:47:36</modified>
		<invoicename>--</invoicename>
		<ordername>Z18/33484</ordername>
		<fkcurrency>1</fkcurrency>
		<statusname>Pending</statusname>
		<symbol>PLN</symbol>
		<paid>0</paid>
		<total>54.12</total>
		<totalgross>66.57</totalgross>
		<isassembling>0</isassembling>
		<assemblyend></assemblyend>
		<paymentdeadline>2018-10-08 13:47:34</paymentdeadline>
		<paymenttag>paypal</paymenttag>
		<ispaid>0</ispaid>
		<ispacked>0</ispacked>
		<isshipped>0</isshipped>
		<mergedids></mergedids>
	</item>
</root>