> For the complete documentation index, see [llms.txt](https://dev.ropo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.ropo.com/guides/general-add-ons/invoice-query-by-ssn-or-customer-number.md).

# Invoice query by SSN or customer number

For each matching invoice, the response includes invoice data and a MyRopoLink. MyRopoLink is included only if the MyRopoLink agreement is active in Ropo One.

Details of the invoice data can be found below.

* Additional information
  * Statuses are the same, which are used in MyRopo (myropo.com)
    * Invoicing
    * Due
    * Reminder
    * Collection
    * Paid (older that 2y from the pay date are not returned)

## POST /jobs/findbyendcustomer

> Find open jobs by end customer SSN or customer number

```json
{"openapi":"3.1.0","info":{"title":"Ropo One","version":"1.0.0"},"tags":[{"name":"jobs","description":"Manage Jobs"}],"servers":[{"url":"/rest","description":"Ropo One"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","bearerFormat":"JWT","scheme":"bearer"}},"schemas":{"JobsByEndCustomerRequest":{"properties":{"ssn":{"description":"Social security number (HETU). Either ssn or custnum is required.","type":"string"},"custnum":{"description":"Customer number. Either ssn or custnum is required.","type":"string"},"all_invoices":{"description":"0 = open invoices only (default), 1 = all invoices including paid.","type":"integer"}},"type":"object"},"JobsByEndCustomerResponse":{"properties":{"jobs":{"description":"List of jobs","type":"array","items":{"$ref":"#/components/schemas/JobByEndCustomer"}}},"type":"object"},"JobByEndCustomer":{"properties":{"case_number":{"description":"Case number (internal job ID)","type":"integer"},"invoice_number":{"description":"Invoice number","type":"string"},"original_invoice_date":{"description":"Original invoice date (origjobdate)","type":"string"},"status":{"description":"Current status (invoicing, due, reminder, collection, paid)","type":"string"},"open_amount":{"description":"Open amount","type":"number","format":"float"},"group_job":{"description":"Whether this is a group job (0=no, 1=yes)","type":"integer"},"group_invoice_numbers":{"description":"Invoice numbers of sub-jobs in the group (only when group_job=1)","type":"array","items":{"type":"string"}},"group_total_payable":{"description":"Total payable amount for the group (only when group_job=1)","type":"number","format":"float"},"my_ropo_link":{"description":"Direct MyRopo link for this invoice","type":"string"}},"type":"object"},"HttpApiProblem":{"title":"HttpApiProblem","description":"HttpApiProblem","properties":{"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem","type":["integer","null"]},"type":{"description":"A URI reference that identifies the problem type","type":["string","null"]},"title":{"description":"A short, human-readable summary of the problem type","type":["string","null"]},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem","type":["string","null"]}},"type":"object"}}},"paths":{"/jobs/findbyendcustomer":{"post":{"tags":["jobs"],"summary":"Find open jobs by end customer SSN or customer number","operationId":"JobsFindByEndCustomerAction","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobsByEndCustomerRequest"}}}},"responses":{"200":{"description":"Jobs found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobsByEndCustomerResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpApiProblem"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpApiProblem"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://dev.ropo.com/guides/general-add-ons/invoice-query-by-ssn-or-customer-number.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
