API method

cancelSale

Method allow to cancel selected sale. Sale can be only cancelled when not packed and no document is generated (sale type must be = -1).

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

Query params

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

  • id integer
    required

    Internal identifier of sale.

  • lang string

    Language of result. ISO 2 Letter Language Codes

    Example

    en, pl, cs

Response fields

Fields returned by this method.

  • 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

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

{
    "messages": {
        "danger": [
            "You do not have permission to perform this action."
        ]
    }
}
Response XML
Example URL: https://b2b.onesto-energy.pl/api/cancelSale.xml?key=YOURAPIKEY&lang=en&id=112087

<?xml version="1.0" encoding="utf-8"?>
<root>
	<messages>
		<danger>
			<item>You do not have permission to perform this action.</item>
		</danger>
	</messages>
</root>