# Ropo One™ Unify

#### Unify service’s API calls <a href="#unify-services-api-calls" id="unify-services-api-calls"></a>

To be able to use Ropo’s unify service through REST, next API calls are required to have in place:

**Posting unify invoices to Ropo One**

{% content-ref url="/pages/rCNyPTWqcnz2cnjf7lCt" %}
[Invoice](/guides/basics/invoice.md)
{% endcontent-ref %}

#### Other most used REST API calls with Unify service are next ones: <a href="#other-most-used-rest-api-calls-with-unify-service-are-next-ones" id="other-most-used-rest-api-calls-with-unify-service-are-next-ones"></a>

**Posting bypass payments for invoices which are in Ropo One**

{% content-ref url="/pages/wd4TOwK261DeytWm5Qa6" %}
[Payment](/guides/basics/payment.md)
{% endcontent-ref %}

**Posting credit note allocated or refunded information for invoices which are in Ropo One**

{% content-ref url="/pages/DbZVc1BYjG9BPuN48Zfl" %}
[Credit note allocation](/guides/basics/credit-note-allocation.md)
{% endcontent-ref %}

**Get the invoice image from Ropo One. REST API call’s response returns the invoice image as pdf.**

{% content-ref url="/pages/Nvip8UHIHLHOZDmSNfmU" %}
[Get PDF](/guides/general-add-ons/get-pdf.md)
{% endcontent-ref %}

**Preview the invoice image before posting the invoice to Ropo One**

{% content-ref url="/pages/8DGD3VOZOjJIJ9k6CxKQ" %}
[Preview of invoice](/guides/general-add-ons/preview-of-invoice.md)
{% endcontent-ref %}

**Post the invoice as a local print to Ropo One and send the invoice by yourself to the recipient. REST API call’s response returns the invoice image as pdf.**

{% content-ref url="/pages/goQ5kgpXBYegxZA4J0Fq" %}
[Local print of invoice](/guides/general-add-ons/local-print-of-invoice.md)
{% endcontent-ref %}

***

#### Unify: Posting unify invoice with minimum level information to Ropo One <a href="#unify-posting-unify-invoice-with-minimum-level-information-to-ropo-one" id="unify-posting-unify-invoice-with-minimum-level-information-to-ropo-one"></a>

Minimum required level information in dataset json of the invoice, for posting it to be unify invoice in Ropo One, are listed below:

**Invoice**

**Invoice Data (dataset tag):**

* **jobtype:** Message type (e.g., 0 for invoice).
* **address:** Address of the recipient.
* **postcode:** Customer’s postal code.
* **company:** b2b end customer’s name (if customer type = 1)
* **person:** b2c end customer’s name (if customer type = 2)
* **city:** Customer’s post office.
* **customertype:** Client type (1 = company, 2 = private person).
* **billdate:** Date of invoice in the form of YYYY-MM-DD.
* **paydate:** Date of issue in the form of yyyy-mm-dd.

**Invoice Rows (payrow tag):**

* **desc:** Name of the product.
* **count:** Number of items.
* **amount:** Unit price (excl. tax).
* **taxpr:** Value Added Tax (0-100)

```json
{
    "datastream": {
        "dataset": [
            {
                "jobtype": "0",
                "address": "123 Main Street",
                "postcode": "12345",
                "company": "test company",
                "customertype": "1",
                "city": "Sample City",
                "billdate": "2025-05-06",
                "paydate": "2025-05-20",
                "payrow": [
                    {
                        "desc": "Product Description",
                        "count": "10.00",
                        "amount": "50.00",
                        "taxpr": "24"
                    }
                ]
            }
        ]
    }
}
```

***

### How to post the unify invoice job to Ropo One <a href="#how-to-post-the-unify-invoice-job-to-ropo-one" id="how-to-post-the-unify-invoice-job-to-ropo-one"></a>

You need to know to which country and to which environment you are posting the reminder job. Ropo has country specific environments for testing and production purposes.

**Test environments:**

* FIN: [https://rc.ropo24.fi](https://rc.ropo24.fi/)
* SWE: [https://rc.ropo24.se](https://rc.ropo24.se/)
* NOR: [https://rc.ropo24.no](https://rc.ropo24.no/)

**Prod environments:**

* FIN: [https://ropo24.fi](https://ropo24.fi/)
* SWE: [https://ropo24.se](https://ropo24.se/)
* NOR: [https://ropo24.no](https://ropo24.no/)

For each environment your company’s Ropo One profile has own cid and apicode.

When posting jobs to Ropo One, you should be using jobs API-call: example swagger link to finnish environment <https://rc.ropo24.fi/swagger/#/jobs/JobAddJobAction>

First you need to do the authorization with cid and api code which Ropo has given to your knowledge:

**Fetch the token from wanted environment with your cid and api code**

```bash
curl -X POST "https://rc.ropo24.fi/rest/token" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"cid\":\"CIDCODE\",\"apicode\":\"APICODE\"}"
```

As a response, you will get the token

```json
{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI3MDAwMDczIiwic2NvcGUiOltdLCJyb2xlcyI6WyJhcGljb2RlIl0sImlhdCI6MTc0Njc3NDQ0NywiZXhwIjoxNzQ2NzgxNjQ3fQ.OJGk9_760dldmaLIkqis2zv8hay5m6VsTDmiTfFuJUo_rTlrEgZXSyrnxhK50Xmfds9z-G-PXPfaJnQX_NnmKw"}
```

Then use the token as authorization header when posting job to Ropo One

```bash
curl -X POST "https://rc.ropo24.fi/rest/jobs" -H "accept: application/json" -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI3MDAwMDczIiwic2NvcGUiOltdLCJyb2xlcyI6WyJhcGljb2RlIl0sImlhdCI6MTc0Njc3NDQ0NywiZXhwIjoxNzQ2NzgxNjQ3fQ.OJGk9_760dldmaLIkqis2zv8hay5m6VsTDmiTfFuJUo_rTlrEgZXSyrnxhK50Xmfds9z-G-PXPfaJnQX_NnmKw" -H "Content-Type: application/json" -d "{\"datastream\":{\"dataset\":[{\"jobtype\":\"0\",\"address\":\"123 Main Street\",\"postcode\":\"12345\",\"company\":\"test company\",\"customertype\":\"1\",\"city\":\"Sample City\",\"billdate\":\"2025-05-06\",\"paydate\":\"2025-05-20\",\"payrow\":[{\"desc\":\"Product Description\",\"count\":\"10.00\",\"amount\":\"50.00\",\"taxpr\":\"24\"}]}]}}"
```

As a response to posting the job to Ropo One, Ropo One gives the information was the job accepted or rejected from Ropo One.

```json
{
 "result": [
 {
 "accepted": 1,
 "amount": 620,
 "billnum": "3222",
 "billcode": "",
 "error": null,
 "evoicetype": "",
 "jobid": 28117994,
 "jobstatus": "0",
 "jobtype": "0",
 "notice": null,
 "origbillnum": null,
 "ownref": "",
 "print": null,
 "receiver": "test company",
 "reference": "157000073281179944",
 "sendtype": "post"
 }
 ],
 "errors": [],
 "accepted": 1
}
```


---

# Agent Instructions: 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:

```
GET https://dev.ropo.com/guides/service-models/ropo-one-tm-unify.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
