Difference between revisions of "Get Invoices Updated Since"

From MyMobileWorkers API
Jump to: navigation, search
(Created page with "== Summary == {| border="1" class="wikitable" ! Jobs ! colspan="2" | |- ! URL | colspan="2" | http://:base_url/:api_path/:version/invoices/since?api_key=YOUR_KEY&since=DATE...")
 
(→‎Example curl request)
 
(6 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
|-
 
|-
 
! URL
 
! URL
−
| colspan="2" |  http://:base_url/:api_path/:version/invoices/since?api_key=YOUR_KEY&since=DATETIME
+
| colspan="2" |  https://:base_url/:api_path/:version/invoices/since?api_key=YOUR_KEY&since=DATETIME&status=JOB_COMPLETED
 
|-
 
|-
 
! Type
 
! Type
Line 16: Line 16:
 
!  
 
!  
 
| since || required
 
| since || required
 +
|-
 +
!
 +
| status ||
 
|-
 
|-
 
|-
 
|-
Line 22: Line 25:
 
|}
 
|}
  
−
The get invoices method returns an array of invoices upto the 'since'  value.
+
The get invoices method returns an array of invoices upto the 'since'  value. The status flag is optional and can narrow the search down by the current job status.
  
 
== Example response ==
 
== Example response ==
  
 
<source lang="java">
 
<source lang="java">
−
 
+
{
 +
    "invoices": [
 +
        {
 +
            "address": "BLT Motors,\nUnit 515 East Works,\nWarrington,\nQA27HW\t\t\t",
 +
            "file": "40/2015/6/1/115283/invoices/invoice_P7YVN9111111111_1_1_2015-06-19_11-58-31.pdf",
 +
            "total": 0,
 +
            "notes": "",
 +
            "job":{"job_number":"15UWVE","external_id":"012345"},
 +
            "created_at": "2015-06-19T11:58:32+01:00",
 +
            "job_status": "JOB_COMPLETED",
 +
            "valid": true,
 +
            "payment_received": false,
 +
            "currency": "gbp",
 +
            "sub_total": 0,
 +
            "vat_total": 0,
 +
            "care_of": "Graham Whistance",
 +
            "invoice_number": "P7YVN911",
 +
            "invoice_date": 1434668400000,
 +
            "account_no": null,
 +
            "po_no": "",
 +
            "invoice_items": [
 +
                {
 +
                    "description": "B40160202",
 +
                    "quantity": 45,
 +
                    "vat_rate": 0,
 +
                    "price": 0,
 +
                    "unit_price": 0,
 +
                    "vat_amount": 0,
 +
                    "discount_enabled": false,
 +
                    "discount_type": "pc",
 +
                    "discount_amount": 0
 +
                }
 +
            ]
 +
        }
 +
    ]
 +
}
 
</source>
 
</source>
  
 
== Example curl request ==
 
== Example curl request ==
  
−
curl "http://live.mymobileworkers.com:8080/api/1/invoices/since?api_keyAPI_KEYsince=2014-01-20%2012:12:12"
+
<source lang="php">
 +
curl "https://api.mymobileworkers.com:8181/api/1/invoices/since?api_keyAPI_KEY&since=2014-01-20%2012:12:12"
 +
</source>

Latest revision as of 09:29, 21 October 2016

[edit] Summary

Jobs
URL https://:base_url/:api_path/:version/invoices/since?api_key=YOUR_KEY&since=DATETIME&status=JOB_COMPLETED
Type GET
Params: api_key required
since required
status
Response JSON

The get invoices method returns an array of invoices upto the 'since' value. The status flag is optional and can narrow the search down by the current job status.

[edit] Example response

{
    "invoices": [
        {
            "address": "BLT Motors,\nUnit 515 East Works,\nWarrington,\nQA27HW\t\t\t",
            "file": "40/2015/6/1/115283/invoices/invoice_P7YVN9111111111_1_1_2015-06-19_11-58-31.pdf",
            "total": 0,
            "notes": "",
            "job":{"job_number":"15UWVE","external_id":"012345"},
            "created_at": "2015-06-19T11:58:32+01:00",
            "job_status": "JOB_COMPLETED",
            "valid": true,
            "payment_received": false,
            "currency": "gbp",
            "sub_total": 0,
            "vat_total": 0,
            "care_of": "Graham Whistance",
            "invoice_number": "P7YVN911",
            "invoice_date": 1434668400000,
            "account_no": null,
            "po_no": "",
            "invoice_items": [
                {
                    "description": "B40160202",
                    "quantity": 45,
                    "vat_rate": 0,
                    "price": 0,
                    "unit_price": 0,
                    "vat_amount": 0,
                    "discount_enabled": false,
                    "discount_type": "pc",
                    "discount_amount": 0
                }
            ]
        }
    ]
}

[edit] Example curl request

curl "https://api.mymobileworkers.com:8181/api/1/invoices/since?api_keyAPI_KEY&since=2014-01-20%2012:12:12"
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox