getSalePositions

Method returns list of sale positions

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

Query params

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

  • id | required

    integer

    Internal identifier of sale.

  • lang

    string

    Language of result. ISO 2 Letter Language Codes ie

    Example: en, pl, cs

  • positionid

    integer

    Internal identifier of sale position

  • fkproduct

    integer

    Internal identifier of product.

  • qty

    float

    Invoice product quantity

  • pid

    string

    Product or service PID

  • ean

    string

    Product or service EAN

  • name

    string

    Product or service Name

  • price

    float

    Position price (net) per unit in sale currency

  • pricegross

    float

    Position price (gross) per unit in sale currency

  • netpricesum

    float

    Total position price (net) in sale currency

  • grosspricesum

    float

    Total position price (gross) in sale currency

  • rate

    float

    VAT rate in percents

Example URL: https://b2b.onesto-energy.pl/api/getSalePositions.json?key=YOURAPIKEY&lang=en&id=112087

[
    {
        "positionid": 4445,
        "fkproduct": 29,
        "qty": 1,
        "fkbundle": 0,
        "pid": null,
        "ean": null,
        "name": "DHL",
        "price": 0,
        "pricegross": 0,
        "bundleqty": null,
        "netpricesum": 0,
        "grosspricesum": 0,
        "rate": 23
    },
    {
        "positionid": 4345,
        "fkproduct": 39375,
        "qty": 1,
        "fkbundle": 0,
        "pid": "F\/196GUL0004A",
        "ean": "",
        "name": "Battery cover Sony D5102 Xperia T3\/ D5103, D5106 Xperia T3 LTE - purple (original)",
        "price": 75.78,
        "pricegross": 75.78,
        "bundleqty": null,
        "netpricesum": 75.78,
        "grosspricesum": 93.21,
        "rate": 23
    },
    {
        "positionid": 4346,
        "fkproduct": 40161,
        "qty": 2,
        "fkbundle": 0,
        "pid": "GH98-32941A",
        "ean": "",
        "name": "USB cover Samsung SM-G900F Galaxy S5 - silver (original)",
        "price": 24.71,
        "pricegross": 24.71,
        "bundleqty": null,
        "netpricesum": 49.42,
        "grosspricesum": 60.79,
        "rate": 23
    },
    {
        "positionid": 4347,
        "fkproduct": 40162,
        "qty": 1,
        "fkbundle": 0,
        "pid": "GH98-32941D",
        "ean": "",
        "name": "USB cover Samsung SM-G900F Galaxy S5 - gold (original)",
        "price": 11.28,
        "pricegross": 11.28,
        "bundleqty": null,
        "netpricesum": 11.28,
        "grosspricesum": 13.87,
        "rate": 23
    },
    {
        "positionid": 546705,
        "fkproduct": 45356,
        "qty": 2,
        "fkbundle": 0,
        "pid": "GH81-13702A",
        "ean": "",
        "name": " Adhesive foil battery cover Samsung SM-G930F Galaxy S7 (original)",
        "price": 22.93,
        "pricegross": 22.93,
        "bundleqty": null,
        "netpricesum": 45.86,
        "grosspricesum": 56.41,
        "rate": 23
    },
    {
        "positionid": 546706,
        "fkproduct": 47990,
        "qty": 2,
        "fkbundle": 0,
        "pid": "GH61-12704A",
        "ean": null,
        "name": "SIM tray Samsung SM-J330F Galaxy J3 (2017) Dual SIM - black (original)",
        "price": 10.03,
        "pricegross": 10.03,
        "bundleqty": null,
        "netpricesum": 20.06,
        "grosspricesum": 24.67,
        "rate": 23
    }
]
Example URL: https://b2b.onesto-energy.pl/api/getSalePositions.xml?key=YOURAPIKEY&lang=en&id=112087

<?xml version="1.0" encoding="utf-8"?>
<root>
	<item>
		<positionid>4445</positionid>
		<fkproduct>29</fkproduct>
		<qty>1</qty>
		<fkbundle>0</fkbundle>
		<pid></pid>
		<ean></ean>
		<name>DHL</name>
		<price>0</price>
		<pricegross>0</pricegross>
		<bundleqty></bundleqty>
		<netpricesum>0</netpricesum>
		<grosspricesum>0</grosspricesum>
		<rate>23</rate>
	</item>
	<item>
		<positionid>4345</positionid>
		<fkproduct>39375</fkproduct>
		<qty>1</qty>
		<fkbundle>0</fkbundle>
		<pid>F/196GUL0004A</pid>
		<ean></ean>
		<name>Battery cover Sony D5102 Xperia T3/ D5103, D5106 Xperia T3 LTE - purple (original)</name>
		<price>75.78</price>
		<pricegross>75.78</pricegross>
		<bundleqty></bundleqty>
		<netpricesum>75.78</netpricesum>
		<grosspricesum>93.21</grosspricesum>
		<rate>23</rate>
	</item>
	<item>
		<positionid>4346</positionid>
		<fkproduct>40161</fkproduct>
		<qty>2</qty>
		<fkbundle>0</fkbundle>
		<pid>GH98-32941A</pid>
		<ean></ean>
		<name>USB cover Samsung SM-G900F Galaxy S5 - silver (original)</name>
		<price>24.71</price>
		<pricegross>24.71</pricegross>
		<bundleqty></bundleqty>
		<netpricesum>49.42</netpricesum>
		<grosspricesum>60.79</grosspricesum>
		<rate>23</rate>
	</item>
	<item>
		<positionid>4347</positionid>
		<fkproduct>40162</fkproduct>
		<qty>1</qty>
		<fkbundle>0</fkbundle>
		<pid>GH98-32941D</pid>
		<ean></ean>
		<name>USB cover Samsung SM-G900F Galaxy S5 - gold (original)</name>
		<price>11.28</price>
		<pricegross>11.28</pricegross>
		<bundleqty></bundleqty>
		<netpricesum>11.28</netpricesum>
		<grosspricesum>13.87</grosspricesum>
		<rate>23</rate>
	</item>
	<item>
		<positionid>546705</positionid>
		<fkproduct>45356</fkproduct>
		<qty>4</qty>
		<fkbundle>0</fkbundle>
		<pid>GH81-13702A</pid>
		<ean></ean>
		<name> Adhesive foil battery cover Samsung SM-G930F Galaxy S7 (original)</name>
		<price>22.93</price>
		<pricegross>22.93</pricegross>
		<bundleqty></bundleqty>
		<netpricesum>91.72</netpricesum>
		<grosspricesum>112.82</grosspricesum>
		<rate>23</rate>
	</item>
	<item>
		<positionid>546706</positionid>
		<fkproduct>47990</fkproduct>
		<qty>4</qty>
		<fkbundle>0</fkbundle>
		<pid>GH61-12704A</pid>
		<ean></ean>
		<name>SIM tray Samsung SM-J330F Galaxy J3 (2017) Dual SIM - black (original)</name>
		<price>10.03</price>
		<pricegross>10.03</pricegross>
		<bundleqty></bundleqty>
		<netpricesum>40.12</netpricesum>
		<grosspricesum>49.35</grosspricesum>
		<rate>23</rate>
	</item>
</root>