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) --- */
"number":"",
"name":"",
"tradeName":"",
"taxIDNumber":"",
"street1":"",
"street2":"",
"country":"",                  // id value from countries.listForSelect
"state":"",                    // id value from states.listForSelect
"city":"",
"postalCode":"",
"phone":"",
"phone2":"",
"fax":"",
"marketID":"",                 // id value from markets.list 
"areaID":"",                   // id value from areas.list
"paymentTypeID":"",            // id value from paymentType.list 
"dueTypeID":"",                // id value from dueDateTypes.list
"remarks":"",
"customerSubscriptionNews":""  // Boolean
}

Response

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
"data":     {
"result":         [
{
"equivalenceSurchageEnabled": false,
"version": 1,
"street1": "This is the name of the street",
"email": "customer@domain.com",
"postalCode": "28001",
"id": "10761",
"paymentTypeID": 1,              
"dueTypeID": 1,
"taxIDNumber": "123456789Z",
"name": "Air Car S.L.",
"number": 16069,
"remarks": "VIP Customer",
"country": "España",
"massiveInvoicingEnabled": false,
"city": "madrid",
"state": "Madrid",
"phone": "123456789",
"hasNewsletterSubscription": false,
"carrierID": " ",   
"freights": " ",    
"priceListID": " ", 
"lineDiscount": " ",
"salesDiscount": " ",
"earlyPaymentDiscount": " "
},
{
.....
}
],
"total": 80
},
"success": true
}

...

Request

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

Response

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
"data":     {
"URL": "www.domain.com",
"areaID": 1,
"marketID": 1,
"paymentDay":23,
"equivalenceSurchageEnabled": false,
"street1": "This is the name of the street line 1",
"street2": "This is the name of the street line 2",
"email": "customer@domain.com",
"postalCode": "28001",
"id": "10761",
"paymentTypeID": 1,
"dueTypeID": 1,
"taxIDNumber": "123456789Z",
"name": "AirCar S.L.",
"tradeName": "Call a Taxi!",
"number": 16069,
"remarks": "VIP Customer",
"country": "ESP",  // Country ID
"massiveInvoicingEnabled": false,
"city": "madrid",
"state": "28",     // State ID
"phone": "123456789",
"phone2": "987654321",
"fax": "456789321",
"hasNewsletterSubscription": false,
"carrierID": " ",                
"freights": " ",                 
"priceListID": " ",   
"lineDiscount": " ",
"salesDiscount": " ",
"earlyPaymentDiscount": " "
},
"success": true
}

...

Request

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
"URL": "www.domain.com",
"areaID": 1,                        // id value from areas.list
"marketID": 1,                      // id value from markets.list 
"paymentDay":23,
"equivalenceSurchageEnabled": false,
"street1": "This is the name of the street line 1",
"street2": "This is the name of the street line 2",
"email": "customer@domain.com",
"postalCode": "28001",
"paymentTypeID": 1,                 // id value from paymentType.list
"dueTypeID": 1,                     // id value from dueDateTypes.list
"taxIDNumber": "123456789Z",       
"name": "AirCar S.L.",              // *Required
"tradeName": "Call a Taxi!",
"number": 16069,                    // If empty, a new one autonumeric is assigned
"remarks": "VIP Customer",
"country": "ESP",                   // id value from countries.listForSelect
"massiveInvoicingEnabled": false,
"city": "madrid",
"state": "28",                      // id value from states.listForSelect
"phone": "123456789",
"phone2": "987654321",
"fax": "456789321",
"hasNewsletterSubscription": false,
"carrierID": " ",                   // id value from carriers.list
"freights": " ",                    // values: 1=Prepaid shipment, 2=Collect on Delivery
"priceListID": " ",                 // id value from itemsPriceLists.list
"lineDiscount": " ",
"salesDiscount": " ",
"earlyPaymentDiscount": " "
}

Response

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

...

Request

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
/* We only send the fields that need to be updated */
{
"id": "11459",
"paymentTypeID": 5,                // id value from paymentType.list
"dueTypeID": 6,                    // id value from dueDateTypes.list
"taxIDNumber": "123456789Z",
"name": "ThisIsMyCompanyName",     // *Required
"version": 1
}

Response

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

...

Request

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue

{
"id": "11459",
"version": 1
}

Response

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

...

Request

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
"companyID": "11625"    // id value from customers.list
}

Response

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
    "data":     {
        "result": [  
            {
            "active": true,
            "alias": "Central",
            "byDefault": true,
            "companyID": 7,
            "id": 4,
            "countryName": "España",
            "phone": "91.235.23.23",
            "postalCode": "28005",
            "stateName": "Madrid",
            "street1": "C/ Soto, 25"
            },  
                {
            "active": true,
            "alias": "Almacén",
            "byDefault": false,
            "city": " ",
            "comments": " ",
            "companyID": 7,
            "id": 1,
            "countryName": "España",
            "phone": "123456789",
            "postalCode": "47059",
            "stateName": "Valladolid",
            "street1": "C/ Plata 123",
            "street2": "Pol. San Cristobal"
        }],
        "total": 2
    },
    "success": true
}

...

Request

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

Response

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
    "data":     {
        "active": true,
        "alias": "Almacén",
        "version": 0,
        "byDefault": false,
        "city": " ",
        "comments": " ",
        "companyName": "David García Pérez",
        "companyNumber": 1,
        "country": "ESP",
        "companyID": 7,
        "id": 1,
        "phone": "123456789",
        "postalCode": "47059",
        "state": 47,
        "street1": "C/ Plata 123",
        "street2": "Pol. San Cristobal"
    },
    "success": true
}

...

Request

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
{
"companyID": "7",         // id value from customers.list
"alias": "Almacén",       // *Required
"street1": "C/ Plata 123",
"street2": "Pol. San Cristobal"
"country": "ESP",         // id value from countries.listForSelect
"state": "47",            // id value from states.listForSelect
"city": " ",
"postalCode": "47059",
"phone": "123456789",
"comments": " ",
"active": "true",
"byDefault": "false"
}

Response

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

...

Request

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue
/* We only send the fields that need to be updated */
{
"id": "1",
"version": "0",
"comments": "Dejar en recepción"
}

Response

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

...

Request

Code Block
controlstrue
themeDefault
languagejavascript
themeDefault
linenumberstrue

{
"id": "1",
"version": 1
}

Response

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