Daily production payload example

The docs are a bit confusing about what payload to submit to post daily productions… The example gives the payload as an object but the Request body in the docs is an array type… Whats the format of the payload to send to Post to the API for daily production data? Can you provide an example of what it would look like?

First of all, welcome to our forum, and thanks for posting your question here!

Just like with most of our POST and PUT endpoints, for daily production you can post either a single document or an array of them.

So this is valid (single production data document):

    {
        "date": "2022-03-04",
        "chosenID": "12345678901234",
        "dataSource": "di",
        "gas": 123,
        "oil": 456,
        "water": 789
    }

And this is valid too (an array of production data documents):

[
    {
        "date": "2022-03-02",
        "chosenID": "12345678901234",
        "dataSource": "di",
        "gas": 123,
        "oil": 456,
        "water": 789
    },
    {
        "date": "2022-03-03",
        "chosenID": "12345678901234",
        "dataSource": "di",
        "gas": 321,
        "oil": 654,
        "water": 987
    },
    {
        "date": "2022-03-04",
        "chosenID": "12345678901234",
        "dataSource": "di",
        "gas": 147,
        "oil": 258,
        "water": 369
    }
]

I only included the most important fields for simplicity, but you can see all the fields we support in the documentation.

In most practical cases you’ll likely want to use an array to be able to include more data in a single request. For daily production you can send up to 20000 documents in a single request.

1 Like

Additionally, if you need more columns, you can write up to 5 different custom fields maintained at the company level.

For example, we are writing the following data:
Custom Number 0 = Flare MCF
Custom Number 1 = Choke
Custom Number 2 = Test Oil
Custom Number 3 = Test Water

Thanks! I am able to get back a success response now.

2 Likes

Yes, that’s correct :+1:. However, you should not need one for Choke, since that’s a field we already include.