Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Request

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
/* — search criteria (optional) — */
"companyNumber":"",      // <-- Numeric
"companyName":"",
"numberFrom":"",         // <-- Numeric
"numberTo":"",           // <-- Numeric
"dateFrom":"",           // <-- Date format DD/MM/AAAA
"dateTo":"",             // <-- Date format DD/MM/AAAA
"totalAmountFrom":"",    // <-- Numeric
"totalAmountTo":"",      // <-- Numeric
"remarks":""
}

Response

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
    "data":     {
        "result":         [
                        {
                "version": 5,
                "id": "2073",
                "documentID": 2073,
                "documentTypeID": 3,
                "number": 1,
                "editable": true,
                "canImport": true,
                "statusColor": "#0000FF",
                "statusDescription": "Sin expedir",
                "status": "nonShipped",
                "currentStatusID": 20,
                "companyID": 11625,
                "companyName": "AirCar S.L.",
                "companyNumber": 1,
                "street1": "This is the name of the street line 1",
                "street2": "This is the name of the street line 2",
                "postalCode": "28001",
                "deliveryAddressDescription": "This is the name of the street line 1 This is the name of the street line 2 28001 madrid ",
                "date": "05/10/2011 00:00:00",
                "remarks": "Entrega urgente",
                "totalAmount": 322.56,
                "withhold": false,
                "equivalenceSurchargeEnabled": false,
                "subtotal": 275.45,
                "userID": 377,
                "userName": "Juan Rodríguez"
            },
                        {
                .....
            },
                        {
                "version": 1,
                "id": "2074",
                "documentID": 2074,
                "documentTypeID": 3,
                "number": 5,
                "editable": true,
                "canImport": true,
                "statusColor": "#0000FF",
                "statusDescription": "Sin expedir",
                "status": "nonShipped",
                "currentStatusID": 20,
                "companyID": 11625,
                "companyName": "AirCar S.L.",
                "companyNumber": 1,
                "street1": "C/Pérez Galdós 55",
                "street2": " ",
                "postalCode": "28025",
                "deliveryAddressDescription": "C/Pérez Galdós 55 28025 madrid ",
                "date": "07/10/2011 00:00:00",
                "remarks": " ",
                "totalAmount": 134.99,
                "withhold": false,
                "equivalenceSurchargeEnabled": false,
                "subtotal": 125.45,
                "userID": 377,
                "userName": "Juan Rodríguez"
			}
        ],
        "total": 5
    },
    "success": true
}

...

Request

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
"id": 2073
}

Response

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
    "data":     {
        "date": "05/10/2011 00:00:00",
        "number": 1,
        "remarks": "Entrega urgente",
        "myCompanyTaxIDNumber": "111111111",
        "myCompanyStreet1": "aaaaaaaa",
        "myCompanyPostalCode": "11111",
        "myCompanyName": "Empresa pruebas desde API",
        "myCompanyCountry": "ESP",
        "myCompanyCountryDescription": "España",
        "myCompanyCity": "aaaaa",
        "myCompanyState": "47",
        "myCompanyStateDescription": "Valladolid",
        "myCompanyPhone": "111111",
        "version": 5,
        "street1": "This is the name of the street line 1",
        "street2": "This is the name of the street line 2",
        "featureDescription": "El albarán no está facturado",
        "invoicedReceivingSlip": "No",
        "carrierName": "Transportes Hernandez S.L.",
        "carrierID": 51,
        "printColor": "#2050B0",
        "companyTradeName": "Call a Taxi!",
        "postalCode": "28001",
        "defaultWithhold": 15,
        "deliveryAddressDescription": "This is the name of the street line 1 This is the name of the street line 2 28001 madrid Madrid España ",
        "deliveryAddressID": -1,
        "earlyPaymentDiscount": 5,
        "earlyPaymentDiscountAmount": 14.49716,
        "editable": true,
        "statusDescription": "Sin expedir",
        "facturaePaymentTypeCode": "02",
        "paymentTypeDescription": "Domiciliación",
        "paymentTypeName": "Domiciliación",
        "lowestPriceForceSave": false,
        "freightsDescription": "Debidos",
        "statesHistory":         [
                        {
                "version": 0,
                "description": "Sin expedir",
                "date": "07/10/2011 10:59:40",
                "changeUser": "Juan Rodríguez"
            },
                        {
                "version": 0,
                "description": "Expedido",
                "date": "07/10/2011 10:35:39",
                "changeUser": "Ana Alvarez"
            },
                        {
                "version": 0,
                "description": "Sin expedir",
                "date": "05/10/2011 12:09:18",
                "changeUser": "Juan Rodríguez"
            }
        ],
        "id": "2073",
        "documentID": 2073,
        "currentStatusID": 20,
        "paymentTypeID": 900,
        "taxIdDefault": 0,
        "companyID": 11625,
        "documentTypeID": 3,
        "dueTypeID": 900,
        "importReceivingSlips": false,
        "importDeliverySlips": false,
        "importCustomerInvoices": false,
        "importSalesQuotes": false,
        "importPurchaseQuotes": false,
        "importSalesOrders": true,
        "importPurchaseOrders": false,
        "taxDescriptionDefault": "",
        "taxValueDefault": 0,
        "withhold": false,
        "productLines": [        {
            "itemReference": "ARES-L0011-3",
            "version": 0,
            "sourceLine": "Manual",
            "description": "Vaciador automático de 1 1/4.",
            "discount": 2,
            "id": "5323",
            "itemID": 2358,
            "taxID": 1330000001300,
            "lineID": 5323,
            "unitAmount": 134.67,
            "amount": 263.9532,
            "taxDescription": "IVA General",
            "taxValue": 18,
            "units": 2
        }],
        "serviceLines": [        {
            "version": 0,
            "sourceLine": "Manual",
            "description": "Servicio de entrega urgente",
            "id": "5324",
            "taxID": 1330000001333,
            "lineID": 5324,
            "unitAmount": 25.99,
            "amount": 25.99,
            "taxDescription": "IVA Reducido",
            "taxValue": 8,
            "units": 1
        }],
        "equivalenceSurchargeEnabled": false,
        "myPersonTypeCode": "J",
        "companyTaxIDNumber": "123456789Z",
        "companyName": "AirCar S.L.",
        "companyNumber": 1,
        "country": "ESP",
        "countryName": "España",
        "isPeriodic": false,
        "pdfTemplate": "General",
        "city": "madrid",
        "freights": 2,
        "state": "28",
        "stateName": "Madrid",
        "canImport": true,
        "forceUpdateStock": false,
        "status": "nonShipped",
        "statusInfo":         [
                        {
                "statusDescription": "Sin expedir",
                "statusName": "nonShipped",
                "transitable": true
            },
                        {
                "statusDescription": "Expedido",
                "statusName": "shipped",
                "transitable": true
            }
        ],
        "subtotal": 275.44604,
        "subtotalWithoutDiscounts": 289.9432,
        "phone": "123456789",
        "dueTypeName": "Contado",
        "generalTotal": 322.56,
        "taxesTotal": 47.110776,
        "taxesSurchargeTotal": 57.140904,
        "withholdTotal": 0,
        "totalLines":         [
                        {
                "id": "5323",
                "totalAmountDiscountsIncluded": 250.7532,
                "taxDescription": "IVA General (18%)",
                "surcharge": 4,
                "selected": [],
                "taxAmount": 45.135576,
                "taxSurchargeAmount": 55.165704,
                "surchargeAmount": 10.030128,
                "taxValue": 18
            },
                        {
                "id": "5324",
                "totalAmountDiscountsIncluded": 24.69,
                "taxDescription": "IVA Reducido (8%)",
                "surcharge": 0,
                "selected": [],
                "taxAmount": 1.9752,
                "taxSurchargeAmount": 1.9752,
                "surchargeAmount": 0,
                "taxValue": 8
            }
        ],
        "userID": 377,
        "userName": "Juan Rodríguez"
    },
    "success": true
}

...

Request

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
"number":"",                 // If empty, a new one autonumeric is assigned
"date":"05/10/2011",
"companyID":"11625",         // id value from customers.list
"paymentTypeID":"900",       // id value from paymentType.list
"dueTypeID":"900",           // id value from dueDateTypes.list
"deliveryAddressID":"-1",    // Use "-1" for default billing address or id from customerAddress.list for delivery addresses
"carrierID":"51",            // id value from carriers.list
"freights":"2",
"remarks":"Entrega urgente",
"withhold":"false",
"withholdAmount":"",
"salesDiscount":"",
"earlyPaymentDiscount":"5",
"productLines":
	[
		{
		"itemID":"2358",          // id value from items.list
		"units":2,
		"unitAmount":"134.6700",
		"discount":2,
		"taxID":1330000001300,   // id value from taxes.list
		"remarks":""
		}
	],
"serviceLines":
	[
		{
		"date":"",
		"description":"Servicio de entrega urgente",
		"units":1,
		"unitAmount":"25.9900",
		"discount":"",
		"taxID":"1330000001333",   // id value from taxes.list
		"remarks":""
		}
	]
}

Response

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
"data": {
"errors": [],
"messages": [ {
"description": "Operación realizada correctamente",
"id": "operation_success"
}],
"warns": []
},
"id": "2073",
"success": true
}

...

Request

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
"id":"2073",
"date":"05/10/2011",
"companyID":"11625",         // id value from customers.list
"paymentTypeID":"900",       // id value from paymentType.list
"dueTypeID":"900",           // id value from dueDateTypes.list
"deliveryAddressID":"-1",    // Use "-1" for default billing address or id from customerAddress.list for delivery addresses
"carrierID":"51",            // id value from carriers.list
"freights":"2",
"remarks":"Entrega urgente",
"withholdAmount":"",
"salesDiscount":"",
"earlyPaymentDiscount":"5",
"version":"4",
"productLines":
	[
		{
		"lineID":5323,
		"itemID":2358,            // id value from items.list
		"units":2,
		"unitAmount":134.67,
		"discount":2,
		"taxID":1330000001300,   // id value from taxes.list
		"remarks":""
		}
	],
"serviceLines":
	[
		{
		"lineID":5324,
		"date":"",
		"description":"Servicio de entrega urgente",
		"units":1,
		"unitAmount":25.99,
		"discount":"",
		"taxID":1330000001333,   // id value from taxes.list
		"remarks":"" 
		}
	],
"newStatus":"nonShipped"
}

Response

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
"data": {
"errors": [],
"messages": [ {
"description": "Operación realizada correctamente",
"id": "operation_success"
}],
"warns": []
},
"id": "2073",
"success": true,
"version": 1
}

...

Request

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
"id":"2073",
"version": 1
}

Response

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
    "data":     {
        "errors": [],
        "messages": [        {
            "args": ["2073"],
            "description": "Operación realizada correctamente",
            "id": "operation_success"
        }],
        "warns": []
    },
    "success": true
}