getSale

Method returns sale details

Usage URL: https://b2b.onesto-energy.pl/api/getSale.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

  • 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,
    101 - Temporary invoice

  • created

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

    When sale was created

  • datecancel

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

    When sale was cancelled

  • modified

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

    When sale was last modified

  • invoicename

    string

    Name of assigned financial document

  • ordername

    string

    Name of sale

  • fksale

    integer

    Internal ID of corrected sale

  • correctedname

    string

    Name of sale that is being corrected by that sale

  • fksalenonrating

    integer

    Internal ID of non rating sale

  • nonratingname

    string

    Name of sale that is marked as a non rating one

  • correctionname

    string

    Name of sale that is correcting this sale

  • symbol

    string

    Sale's currency symbol

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

  • fkcurrency

    integer

    Internal ID of used currency

  • shipmenttypeid

    integer

    Shipment type internal identifier

  • shipmenttypename

    string

    Shipment type name

  • pickuppointid

    integer

    Pickup point ID for selected provider

  • paymenttypeid

    integer

    Payment type internal identifier

  • paymenttypename

    string

    Payment type name

  • paymentdescription

    string

    Payment type description

  • paymenttag

    string

    Internal tag of payment type

  • receivername

    string

    Receiver name

  • postalcode

    string

    Receiver postal code

  • city

    string

    Receiver city

  • street

    string

    Receiver street

  • bno

    string

    Receiver building no.

  • lno

    string

    Receiver locale no.

  • fkcountry

    integer

    Receiver country internal ID

  • countryname

    string

    Receiver country name

  • iso

    string

    Receiver country ISO code

    Example: Two letters format ie: DE, PL, GB, US

  • phone

    string

    Receiver phone no.

  • email

    string

    Receiver email address

  • weight

    float

    Total net weight of sale's products

  • weightgross

    float

    Total gross weight of sale's products

  • notice

    string

    Sale's notice

  • paydays

    integer

    Days until sale will be cancelled if not payed

  • fkcontractor

    integer

    Buyer's internal ID

  • contractorname

    string

    Buyer (invoice) full name (or company name)

  • contractorpostalcode

    string

    Buyer (invoice) postal code

  • contractorcity

    string

    Buyer (invoice) city

  • contractorstreet

    string

    Buyer (invoice) street

  • contractorbuildingno

    string

    Buyer (invoice) building no.

  • contractorflatno

    string

    Buyer (invoice) locale no.

  • contractorfkcountry

    integer

    Buyer (invoice) country internal ID

  • contractorcountryname

    string

    Buyer (invoice) country name

  • contractorcountryiso

    string

    Buyer (invoice) country ISO code

    Example: Two letters format ie: DE, PL, GB, US

  • paid

    float

    Value paid

  • paymentdeadline

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

    Payment deadline

  • isassembling

    boolean (1 = true, 0 = false)

    Points whether sale is marked as still assembling

  • ispaid

    boolean (1 = true, 0 = false)

    Points whether sale is fully paid

  • ispacked

    boolean (1 = true, 0 = false)

    Points whether sale is already packed

  • isshipped

    boolean (1 = true, 0 = false)

    Points whether sale is shipped

  • mergedids

    string

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

  • leadtime

    integer

    Processing time in days since order was placed

  • productprice

    float

    Total net price of sale's products

  • productpricegross

    float

    Total gross price of sale's products

  • packageprice

    float

    Net price for packaging

  • packagepricegross

    float

    Gross price for packaging

  • paymentprice

    float

    Net price of sale's payment method

  • paymentpricegross

    float

    Gross price of sale's payment method

  • shipmentprice

    float

    Net price of sale's shipment method

  • shipmentpricegross

    float

    Gross price of sale's shipment method

  • total

    float

    Total net price of sale's previous prices

  • totalgross

    float

    Total gross price of sale's previous prices

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

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