upCampo API
Integration reference — updated on . Written by Jonas Rotilli.
The upCampo platform services API provides an easy, technology-independent way to integrate with other systems. It is based on HTTP/HTTPS GET and POST calls, with a JSON body. Therefore, any system able to make a standard HTTP/HTTPS call can use the services provided.
In practice, the customer's ERP (Siagri, Sankhya and others) pulls master data and transactions from upCampo and sends back its own identifier — the ID_REFERENCIA — to link both sides. This field is what holds the whole integration together; read the ID_REFERENCIA section before writing the first line of code.
In theory, an endpoint can be created for any table on the platform. Access, however, is granted case by case, based on an analysis of the need. Contact the upCampo team to request an endpoint that is not on this page.
How to read this page
- The left column describes the endpoint, its parameters and its fields.
- The right column shows a ready-made request and an example of a real response.
- All examples use
$TOKENin place of the token obtained from /autenticar.
Explore and test
This page explains what each endpoint means. To see the full list in interactive form — with the fields, the schemas and a button that fires the call —, use the explorer:
Machine-readable specification
Besides this page, the API has an OpenAPI 3.1 specification with every endpoint, parameter, body and response. Import it into Postman, Insomnia, Swagger UI or a client generator:
# 1. authenticate and keep the token (valid for 24 hours) curl -X POST https://api.upcampo.com.br/autenticar \ -H 'Content-Type: application/json' \ -d @credenciais.json # 2. consume the data with the token in the header curl https://api.upcampo.com.br/produto \ -H 'Authorization: Bearer $TOKEN' # 3. send the id from your system back to upCampo curl -X POST 'https://api.upcampo.com.br/produtoReferencia?id_upcampo=F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F&id_referencia=25' \ -H 'Authorization: Bearer $TOKEN'
Base URL
The request URL always follows the same pattern, regardless of the service:
https://api.upcampo.com.brThroughout this page, URL BASE means this address. The server also answers at http://api.upcampo.com.br, but use HTTPS: the traffic carries your token.
Parameters
- In
GET, parameters always go in the URL. Parameter names are case-sensitive and, by convention, are all lowercase. - If there is more than one, join them with
&. - Strings do not need quotes.
- Values with spaces or accents must be URL-encoded (space =
%20).
Date format
There are three formats, each used in one place. What you send is always the ISO standard — year, month, day, in that order, with hyphens:
| Where | Format | Example |
|---|---|---|
Period filter in the URL — data_inicial, data_final |
YYYY-MM-DD | 2024-08-19 |
Modification filter in the URL — datmod_inicial |
YYYY-MM-DD HH:MM:SS | 2024-03-15 07:00:00 |
Date field in the body of a POST — DATA, DATPLA, DATCOL, DATVEN |
YYYY-MM-DD | 2024-08-19 |
Where the response includes a date, it usually comes as a pair: DATA in YYYY-MM-DD format, for your system to process, and DATASTRING in dd/mm/yyyy, for display on screen. The same applies to DATPRE / DATPRESTRING and DATFIN / DATFINSTRING in the work order. Some fields come back with time and time zone (2023-12-12T12:55:15.532Z) — treat them as a full date/time; do not cut the string.
The filter value goes straight into the database query. In YYYY-MM-DD there is no ambiguity; in 31/01/2024 the reading depends on the server configuration, and the query may fail or — worse — return the wrong period without warning.
Without data_inicial, the route returns nothing instead of reporting an error. If the response comes back empty for no apparent reason, first check that the date parameter was sent and is spelled exactly like that — the name is also case-sensitive.
https://api.upcampo.com.br/talhao?setor=BOA VISTA
https://api.upcampo.com.br/plantio_safra?id_safra=xyz&id_cultura=zyx
Authentication POST
/autenticarAuthentication uses a Client ID and a Client Secret provided to the partner by upCampo, in a JSON credentials file. This pair is individual per partner × company × farm — that is, each farm requires its own Client ID and Client Secret.
When the Client ID and Secret are issued, the company ID and the farm ID are fixed internally in the API. Each endpoint returns only data from that company and that farm — there is no parameter to change this in the call.
When authentication succeeds, the API returns a token with a fixed validity of 24 hours. The response body contains only access_token and token_type: the expiry is inside the token itself, in the JWT exp field.
Do not generate a new token for every call. There is a maximum of 10 authentication attempts every 15 minutes per client_id; beyond that, the API responds 429 and the Retry-After header tells you in how many seconds access is restored.
The limit is per client_id, so a partner that overdoes it does not affect the others. Anyone who generates one token a day and reuses it never runs into it — the token is valid for 24 hours.
Once the token has been generated, every subsequent call must include it in the header, as a bearer token:
Authorization: Bearer <token>Request body
| Field | Type | Notes |
|---|---|---|
| client_id | String | Provided by upCampo. |
| client_secret | String | Provided by upCampo. |
| audience | String | https://api.upcampo.com.br |
| grant_type | String | client_credentials |
upCampo delivers this JSON ready to use to the partner.
curl -X POST https://api.upcampo.com.br/autenticar \
-H 'Content-Type: application/json' \
-d '{
"client_id": "CLIENT ID QUE A UPCAMPO LHE INFORMARÁ",
"client_secret": "CLIENT SECRET QUE A UPCAMPO LHE INFORMARÁ",
"audience": "https://api.upcampo.com.br",
"grant_type": "client_credentials"
}'
{
"client_id": "CLIENT ID QUE A UPCAMPO LHE INFORMARÁ",
"client_secret": "CLIENT SECRET QUE A UPCAMPO LHE INFORMARÁ",
"audience": "https://api.upcampo.com.br",
"grant_type": "client_credentials"
}
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
"token_type": "Bearer"
}
{
"status": "Invalid token"
}
{
"status": "Erro",
"error": "Muitas tentativas de autenticação. Gere o token uma vez e use-o até expirar (24 horas), em vez de gerar um por chamada. Tente de novo em 900 segundos."
}
Test the token GET
/testeMake a simple GET to the teste route, with the bearer token. It is the lightweight way to check the token, without loading any data route or the database.
Possible responses
| Situation | HTTP | Content |
|---|---|---|
| Authorized | 200 OK | status, mensagem and nome — the token name shows the farm and the environment (PROD or HOMOLOGACAO). |
| Token not recognized | 401 | "error": "Token não inválido" |
| Token not provided | 401 | "error": "Token não fornecido" |
curl https://api.upcampo.com.br/teste \ -H 'Authorization: Bearer $TOKEN'
{
"status": "Sucesso",
"mensagem": "Hello world, você está na API da upCampo!",
"nome": "Nome do token, nome da fazenda + PROD ou HOMOLOCACAO"
}
{
"status": "Erro",
"error": "Token não inválido"
}
{
"status": "Erro",
"error": "Token não fornecido"
}
Response codes
The API uses standard HTTP codes on every call.
| Code | Meaning |
|---|---|
| 200 | Authorized — it worked. |
| 400 | Request error: before reaching the server, a primary error, or a database error (a nonexistent column, for example). |
| 401 | The token has expired or is invalid; you need to generate a new one. The detailed reason comes in the response body. |
| 429 | Too many authentication attempts for the same client_id — limit of 10 every 15 minutes. The Retry-After header gives the number of seconds until access is restored. |
| 500 | Validation error — the request reached the database and some rule blocked the record. The body returns the results array with STATUS: "ERRO". |
When a database error occurs, the response is a JSON with status and detalhe, with HTTP 400 — see the example alongside.
{
"status": "Erro",
"detalhe": {
"message": "Invalid column name 'teste'.",
"code": "EREQUEST",
"number": 207,
"state": 1,
"class": 16,
"serverName": "pragueiroserver",
"procName": "",
"lineNumber": 1
}
}
General endpoint rules
- Every table has a column called
ID_REFERENCIA. That is where the record's identifier in the partner's system is stored. - In
POST, send all JSON attributes in UPPERCASE. - To delete, send the
DELETADOattribute with the valuetrue. - The body of a
POSTis always an array: you can send several records in the same request.
Insert or update?
The ID_REFERENCIA decides. When it receives a POST, upCampo looks in the corresponding table for a record with that ID_REFERENCIA:
- does not exist → it is an insert;
- already exists → it is an update.
Standard write response
| Field | Meaning |
|---|---|
| TABELA | The table in question, to be inserted or updated. |
| ID_UPCAMPO | upCampo's internal identifier. This is where the partner gets it, in case it needs to store it. |
| ID_REFERENCIA | The partner system's identifier. When sending more than one record in the same request, the partner goes through the result to find the status of each of its ids. |
| STATUS | Three options: INCLUIDO (inserted), ALTERADO (updated) or ERRO (error). |
| MENSAGEM | When the status is ERRO, describes the reason. |
In movements and transfers, the response has one CABECALHO (header) line and one DETALHE (detail) line per item. A single line with STATUS: "ERRO" is enough for the whole document not to be saved.
[
{
"TABELA": "PRODUTO",
"ID_UPCAMPO": "7B6E1387-E3BC-4DE9-B8F2-63703B4F9495",
"ID_REFERENCIA": "30",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
}
]
[
{
"TABELA": "CABECALHO",
"ID_UPCAMPO": "B674DF03-052C-427D-9CCD-FFA553F88D18",
"ID_REFERENCIA": "21",
"STATUS": "ERRO",
"MENSAGEM": "Documento finalizado não pode ser alterado"
}
]
[
{
"TABELA": "CABECALHO",
"ID_UPCAMPO": "31ACB79E-0FF8-453D-9AD2-0608C935D960",
"ID_REFERENCIA": "22",
"STATUS": "ERRO",
"MENSAGEM": "Problema em algum item do documento"
},
{
"TABELA": "DETALHE",
"ID_UPCAMPO": "DBB01E35-53E5-453B-A7E2-03552B125992",
"ID_REFERENCIA": "22_A",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
},
{
"TABELA": "DETALHE",
"ID_UPCAMPO": null,
"ID_REFERENCIA": "22_B",
"STATUS": "ERRO",
"MENSAGEM": "Produto não encontrado"
}
]
[
{
"TABELA": "CABECALHO",
"ID_UPCAMPO": "BE2F2CEC-0142-41A0-A3A6-DAC557A78696",
"ID_REFERENCIA": "22",
"STATUS": "ERRO",
"MENSAGEM": "Problema em algum item do documento"
},
{
"TABELA": "DETALHE",
"ID_UPCAMPO": null,
"ID_REFERENCIA": null,
"STATUS": "ERRO",
"MENSAGEM": "Validacao: (MILHO EM GRAOS) - O saldo ficará negativo (origem) (-5.000000). 9 - Impossível continuar."
}
]
ID_REFERENCIA
This column is present in every table and makes the partner's life much easier: it appears in every GET and is taken into account in every POST.
- The record in upCampo has its own identifier; in the
ID_REFERENCIAcolumn the partner puts the identifier from its own system. There are three ways to store this reference:- through the system — every screen in the web portal has a field for it;
- through a POST of the whole object;
- through the reference route, which changes only this field — see Update only the reference.
- In any
GETof a table containing, for example, a product, there will be anID_REFERENCIAattribute. - In a
POST— of a movement, say —, just put the attribute with theID_REFERENCIAin the JSON and upCampo finds the corresponding record in its own table.
In responses, the same data appears in three forms: <ENTIDADE>_DESCRICAO (the name in upCampo), ID_<ENTIDADE>_UPCAMPO (the internal identifier) and ID_<ENTIDADE>_REFERENCIA (the identifier in your ERP). When sending, always use the _REFERENCIA form.
curl -X POST 'https://api.upcampo.com.br/produtoReferencia?id_upcampo=F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F&id_referencia=25' \ -H 'Authorization: Bearer $TOKEN'
{
"PRODUTO_DESCRICAO": "BRAVONIL 720",
"ID_PRODUTO_UPCAMPO": "BC8DC697-9673-4636-B78D-370926042403",
"ID_PRODUTO_REFERENCIA": "330"
}
Synchronization flow
The ideal usage scenario is this:
- Every time a user creates or changes a record in upCampo, the modification date is updated.
- The partner makes a
GETusing the modification date as a parameter:datmod_inicial=2024-3-15 07:00. Save the date of each query to use it in the next query and retrieve only what has changed since then. - The partner processes the results in its own system: if it already has an
id_referencia, it is an update; if not, it is an insert. - The partner makes a
POSTto that group's reference route (for exampleabastecimentoReferencia) with the identifier generated on its side.
On transaction routes — movements, transfers and work orders — the period between data_inicial and data_final is at most 7 days. For a historical load, make several calls in consecutive windows. The rain routes and the scouting (IPM) routes are the exception: their window is 366 days.
# only what changed since the last query curl -G https://api.upcampo.com.br/abastecimento \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'datmod_inicial=2024-03-15 07:00'
Update only the reference POST
In some cases you only need to change the reference — that is, just store the partner system's identifier in the upCampo database, to make future use easier. So you do not have to fill in the whole object, there is a simple way: just add the parameters id_upcampo (the identifier in the upCampo database) and id_referencia (the identifier in the partner's system).
/<entidade>Referencia?id_upcampo=…&id_referencia=…
Available endpoints
| Route | Entity |
|---|---|
| /safraReferencia | Season |
| /plantio_safraReferencia | Season Planting |
| /tipo_atividadeReferencia | Activity Type |
| /equipeReferencia | Team |
| /funcionarioReferencia | Employee |
| /local_estoqueReferencia | Storage Location |
| /culturaReferencia | Crop |
| /variedadeReferencia | Variety |
| /classeReferencia | Product Class |
| /produtoReferencia | Product |
| /equipamentoReferencia | Equipment / fleet / asset |
| /movimentacaoReferencia | Movement (invoice) |
| /transferenciaReferencia | Transfer between storage locations |
| /fardoReferencia | Bale |
| /abastecimentoReferencia | Fueling |
| /pluviometroReferencia | Rain Gauge |
| /pluviometro_coletaReferencia | Rainfall reading |
| /ordem_agricola_insumoReferencia | Agricultural work order — inputs |
| /ordem_agricola_execucaoReferencia | Agricultural work order — executions |
| /ordem_agricola_completaReferencia | Agricultural work order — complete. Also accepts the optional parameter codSai, for when the code generated in the partner's system differs from the order code in upCampo. |
curl -X POST 'https://api.upcampo.com.br/culturaReferencia?id_upcampo=135CFB89-1DAC-4A04-B7CA-4D2A0ADDAB29&id_referencia=1234' \ -H 'Authorization: Bearer $TOKEN'
curl -X POST 'https://api.upcampo.com.br/ordem_agricola_completaReferencia?id_upcampo=…&id_referencia=…&codSai=…' \ -H 'Authorization: Bearer $TOKEN'
Endpoint index
The main GET endpoints and their parameters. Each one is enabled case by case — contact upCampo to request it.
| Title | Route | Parameters | Area / module |
|---|---|---|---|
| Variety | /variedade | None | Crops |
| Crop | /cultura | None | Crops |
| Field | /talhao | setor (optional) |
Crops |
| Season | /safra | None | Crops |
| Season Planting | /plantio_safra | id_safra (optional)id_cultura (optional) |
Crops |
| Product Class | /classe_produto | None | Inventory |
| Product | /produto | id_classe (optional) |
Inventory |
| Storage Location | /local_estoque | setor (optional) |
Inventory |
| Transfer between storage locations | /transferencia | data_inicial and data_final (required, 7-day window)id_local_origem and id_local_destino (optional) |
Inventory |
| Movement (invoice) | /movimentacao | data_inicial and data_final (required, 7-day window) |
Inventory |
| Agricultural work order — INPUTS | /ordem_agricola_insumo | data_inicial and data_final (required, 7-day window) |
Crops and Inventory |
| Agricultural work order — EXECUTION | /ordem_agricola_execucao | data_inicial and data_final (required, 7-day window) |
Crops and Inventory |
| Equipment / Fleet / Asset | /equipamento | id_classificacao (optional) |
Fleet |
| Fueling | /abastecimento | data_inicial and data_final (required)id_local and id_local_referencia (optional)id_equipamento and id_equipamento_referencia (optional)numero, id_referencia, id_abastecimento_upcampo (optional) |
Fleet |
| Rain Gauge | /pluviometro | id_upcampo, id_referencia, codigo, setor, id_talhao, datmod_inicial (optional) |
Crops |
| Rainfall reading | /pluviometro_coleta | data_inicial and data_final (optional, 366-day window)datmod_inicial, id_pluviometro, id_pluviometro_referencia, id_talhao (optional) |
Crops |
| Complete rain gauge | /pluviometroCompleto | data_inicial and data_final (optional, 366-day window)id_upcampo, id_referencia, codigo, setor, id_talhao (optional) |
Crops |
| Scouting (IPM) 1 per scouting — date + field |
/levantamento | data_inicial and data_final (optional, 366-day window)datmod_inicial, id_upcampo, id_talhao, id_talhao_referencia, codigo_talhao, setor, id_safra, id_plantio, id_cultura (optional) |
Crops |
| Scouting — points 1 per sampling point |
/levantamento_ponto | data_inicial and data_final (optional, 366-day window)datmod_inicial, id_levantamento, id_talhao, id_plantio, id_safra, id_usuario, ponto (optional) |
Crops |
| Scouting — phenology 1 per phenology type |
/levantamento_fenologia | data_inicial and data_final (optional, 366-day window)datmod_inicial, id_levantamento, id_talhao, id_plantio, id_safra, tipo_fenologia (optional) |
Crops |
| Scouting — pest (summary) 1 per pest, consolidating the points |
/levantamento_praga_resumo | data_inicial and data_final (optional, 366-day window)datmod_inicial, id_levantamento, id_talhao, id_plantio, id_safra, id_praga, codigo_praga, tipo, alerta_cor (optional) |
Crops |
| Scouting — pest per point 1 per pest × point, raw value |
/levantamento_praga_ponto | data_inicial and data_final (optional, 366-day window)datmod_inicial, id_levantamento, id_talhao, id_plantio, id_safra, id_praga, codigo_praga, tipo, id_usuario, ponto (optional) |
Crops |
| Complete scouting the header with the children nested |
/levantamentoCompleto | data_inicial and data_final (optional, 366-day window)incluir_praga_ponto, id_upcampo, id_talhao, id_talhao_referencia, codigo_talhao, setor, id_safra, id_plantio (optional) |
Crops |
Also documented on this page
Crop GETPOST
/culturaThe crop is what is planted — soybean, corn, cotton. It is the top of the crop hierarchy: the variety belongs to a crop, and the season planting links crop, variety and field.
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| ID_REFERENCIA | String | Yes | Identifier in the third-party ERP. If upCampo finds it, it is an update; if not, it is a new record. |
| DESCRICAO | String | Yes | Name. |
| CODIGO | String | — | |
| ATIVO | Boolean | — | true or false. |
| DELETADO | Boolean | — | Use true to send a deletion. |
curl -X POST https://api.upcampo.com.br/cultura \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d @cultura.json
[
{
"ID_REFERENCIA": "1",
"CODIGO": "0001",
"DESCRICAO": "Cultura- TESTE INTEGRACAO 2",
"ATIVO": true,
"DELETADO": false
}
]
[
{
"TABELA": "CULTURA",
"ID_UPCAMPO": "1D64C046-B166-4E66-8A2F-02E1E75102CA",
"ID_REFERENCIA": "1",
"STATUS": "ALTERADO",
"MENSAGEM": ""
}
]
Variety GETPOST
/variedadeThe variety (or cultivar) is the genetic material planted within a crop. Every variety belongs to a crop — that is why ID_CULTURA_REFERENCIA is required when sending.
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| ID_REFERENCIA | String | Yes | Identifier in the third-party ERP. If upCampo finds it, it is an update; if not, it is a new record. |
| DESCRICAO | String | Yes | Name. |
| CODIGO | String | — | |
| DIACIC | Integer | — | Cycle length in days. |
| ATIVO | Boolean | — | true or false. |
| DELETADO | Boolean | — | Use true to send a deletion. |
| ID_CULTURA_REFERENCIA | String | Yes | Identifier of the crop in the third-party ERP. This code must be mapped in the upCampo record so that its identifier can be found. |
[
{
"ID_REFERENCIA": "1",
"CODIGO": "0001",
"DESCRICAO": "Variedade integracao",
"ATIVO": true,
"DELETADO": false,
"ID_CULTURA_REFERENCIA": "1"
}
]
[
{
"TABELA": "VARIEDADE",
"ID_UPCAMPO": "58637420-AF58-4BF5-9E6C-28E79078D263",
"ID_REFERENCIA": "1",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
}
]
[
{
"ID": "EBB2540D-15CA-4A4F-9989-8CF8C820E983",
"CODIGO": "001",
"DESCRICAO": "TMG 31 B3RF",
"ATIVO": true,
"DIACIC": 150,
"ID_EMPRESA": "B28C5012-D7E8-4987-A9F1-188287F72FE9",
"ID_CULTURA": "5795CCB1-44FC-44B8-AAB9-0DBDD4182E68",
"ID_REFERENCIA": null
}
]
Field GET
/talhaoThe field is the planted area. It accepts the optional parameter setor (sector) — on most farms, the sector is the name of the unit within the group. Use this route to find the exact description and the identifiers of the field before filtering other routes by it.
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| ID_REFERENCIA | String | Yes | Identifier in the third-party ERP. |
| DESCRICAO | String | Yes | Field name. |
| CODIGO | String | — | |
| AREA | Number | Yes | In hectares. |
| SETOR | String | — | |
| ATIVO | Boolean | — | true or false. |
| DELETADO | Boolean | — | Use true to send a deletion. |
To store your system's identifier in an existing field, use the reference route. To create or change a field through the API, contact the upCampo team: access is granted case by case.
curl -G https://api.upcampo.com.br/talhao \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'setor=BOA VISTA'
[
{
"ID_REFERENCIA": "1",
"CODIGO": "0001",
"DESCRICAO": "TH 01",
"AREA": 250.6,
"SETOR": "BOA VISTA",
"ATIVO": true,
"DELETADO": false
}
]
[
{
"TABELA": "TALHAO",
"ID_UPCAMPO": "58637420-AF58-4BF5-9E6C-28E79078D263",
"ID_REFERENCIA": "1",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
}
]
Season GET
/safraThe season is the production cycle — it is what separates what was planted, applied and harvested in one year from what was done the following year. Practically every transaction route carries the season identifier.
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| ID_REFERENCIA | String | Yes | Identifier in the third-party ERP. |
| DESCRICAO | String | Yes | Season name. |
| CODIGO | String | — | |
| ATIVO | Boolean | — | true or false. |
| DELETADO | Boolean | — | Use true to send a deletion. |
Use /safraReferencia.
curl https://api.upcampo.com.br/safra \ -H 'Authorization: Bearer $TOKEN'
[
{
"ID_REFERENCIA": "1",
"CODIGO": "0001",
"DESCRICAO": "Safra 2025/2026",
"ATIVO": true,
"DELETADO": false
}
]
[
{
"TABELA": "SAFRA",
"ID_UPCAMPO": "58637420-AF58-4BF5-9E6C-28E79078D263",
"ID_REFERENCIA": "1",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
}
]
Season Planting GET
/plantio_safraThe season planting is the record that links season + field + crop + variety + area. It is the key to almost every crop query: the bale, the load ticket and the work order point to it through ID_PLANTIO_SAFRA_UPCAMPO or ID_PLANTIO_SAFRA_REFERENCIA.
Parameters
| Parameter | Required |
|---|---|
| id_safra | Optional |
| id_cultura | Optional |
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| ID_REFERENCIA | String | Yes | Identifier in the third-party ERP. |
| ID_SAFRA_REFERENCIA | String | Yes | Identifier of the season in the third-party ERP, mapped in the upCampo record. |
| ID_CULTURA_REFERENCIA | String | Yes | Identifier of the crop in the third-party ERP, mapped in the upCampo record. |
| ID_TALHAO_REFERENCIA | String | Yes | Identifier of the field in the third-party ERP, mapped in the upCampo record. |
| ID_VARIEDADE_REFERENCIA | String | Yes | Identifier of the variety in the third-party ERP, mapped in the upCampo record. |
| DATPLA | String | — | Planting date, in YYYY-MM-DD format. |
| DATCOL | String | — | Harvest date, in YYYY-MM-DD format. |
| AREA | Number | Yes | In hectares. |
curl 'https://api.upcampo.com.br/plantio_safra?id_safra=xyz&id_cultura=zyx' \ -H 'Authorization: Bearer $TOKEN'
[
{
"ID": "AD6DDC4D-981B-4755-8AE2-1F001D7E8B03",
"ID_SAFRA": "8B1BA1A7-B454-47F0-A2A3-8DD9980F8514",
"ID_QUADRA": "038F7B2C-C337-4401-8E18-9DE202D92112",
"ID_CULTURA": "5795CCB1-44FC-44B8-AAB9-0DBDD4182E68",
"ID_VARIEDADE": "EBB2540D-15CA-4A4F-9989-8CF8C820E983",
"AREA": 81,
"DATPLA": "2022-01-20T00:00:00.000Z",
"DATCOL": null,
"ID_DETALHE": null,
"ATIVO": true,
"ID_EMPRESA": "B28C5012-D7E8-4987-A9F1-188287F72FE9",
"ID_FILIAL": "DE319CA8-601F-4E68-978D-D0FB0DC27457"
}
]
[
{
"ID_REFERENCIA": "1",
"ID_SAFRA_REFERENCIA": "1",
"ID_CULTURA_REFERENCIA": "1",
"ID_TALHAO_REFERENCIA": "1",
"ID_VARIEDADE_REFERENCIA": "1",
"DATPLA": "2023-3-27",
"DATCOL": "2024-3-01",
"AREA": 200.50
}
]
Rain Gauge GET
/pluviometroRegister of the farm's rain gauges. Each one can cover specific fields or be general for the farm — the coverage is shown by /pluviometroCompleto. The route returns only active rain gauges.
Parameters
| Option | Parameter | Notes |
|---|---|---|
| 1 | datmod_inicial | Initial modification date, for incremental synchronization. Format YYYY-MM-DD HH:MM:SS; the time is optional. |
| 2 | id_upcampo | Identifier of the rain gauge in upCampo. |
| 3 | id_referencia | Identifier in the partner's system. |
| 4 | codigo | Code of the rain gauge in upCampo. |
| 5 | setor | Sector of the rain gauge. |
| 6 | id_talhao | Returns the rain gauges that cover this field, by the upCampo identifier. |
All are optional and can be combined. With no parameter at all, the route returns all of the farm's active rain gauges.
Fields
| Field | Type | Notes |
|---|---|---|
| ID_PLUVIOMETRO_UPCAMPO | String | Identifier of the rain gauge in upCampo. |
| ID_REFERENCIA | String | Identifier in the partner's system, stored through the /pluviometroReferencia route. |
| CODIGO | String | Code in upCampo. |
| DESCRICAO | String | Name of the rain gauge. |
| TIPO | String | Manual or automatic (weather station sending data via API). |
| SETOR | String | Sector of the gauge. |
| LATITUDE LONGITUDE |
Number | Coordinates, when registered. |
| ATIVO | Boolean | The route only returns active rain gauges, so it is always true. |
| EXCLUIDO | Boolean | Logical deletion. |
| DATA_MODIFICACAO | String | Last change to the record, in Brasília time. It is the value to store for the datmod_inicial of the next query. |
curl -G https://api.upcampo.com.br/pluviometro \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'setor=BOA VISTA'
[
{
"ID_FILIAL": "F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F",
"ID_PLUVIOMETRO_UPCAMPO": "7C1F0B2E-4D33-42A8-9B10-5E7A6C3D9F41",
"ID_REFERENCIA": "PLU-01",
"CODIGO": "0001",
"DESCRICAO": "Sede",
"TIPO": "Manual",
"SETOR": "BOA VISTA",
"LATITUDE": -12.654321,
"LONGITUDE": -45.123456,
"ATIVO": true,
"EXCLUIDO": false,
"DATA_MODIFICACAO": "2024-08-19T10:22:41.120"
}
]
Rainfall reading GET
/pluviometro_coletaEach line is the reading of one rain gauge on one day: the day's rain in MILIMETROS (millimeters), plus the weather condition and the temperature, when recorded. It is the raw field data — the same that feeds the rainfall tracking in the web portal.
A field can be covered by more than one rain gauge. Adding up the day's readings overstates the rain: the right way is the average across the gauges, which is how the web portal calculates it. That is why the route returns each reading separately, with the gauge name.
Parameters
| Option | Parameter | Notes |
|---|---|---|
| 1 | datmod_inicial | Initial modification date, for incremental synchronization. Format YYYY-MM-DD HH:MM:SS. When sent alone, the date window is not applied: everything that changed since that date comes back. |
| 2 | data_inicial | Reading date, in YYYY-MM-DD. Combines with data_final, which defaults to today. On the rain routes the window is 366 days, not the 7 days of the other transaction routes. Without either one, the route returns the last 30 days. |
| 3 | id_pluviometro | Rain gauge, by the upCampo identifier. Alternative: id_pluviometro_referencia, by your system's identifier. |
| 4 | id_talhao | Returns the readings of the rain gauges that cover this field. A reading is not repeated for each field covered. |
| 5 | id_upcampo | A specific reading. Alternative: id_referencia. |
Example: ?data_inicial=2024-08-01&data_final=2024-08-31
Fields
| Field | Type | Notes |
|---|---|---|
| ID_COLETA_UPCAMPO | String | Identifier of the reading in upCampo. |
| ID_REFERENCIA | String | Identifier in the partner's system, stored through the /pluviometro_coletaReferencia route. |
| EXCLUIDO | Boolean | Logical deletion. |
| DATA_MODIFICACAO | String | Last change to the record, in Brasília time. |
| DATASTRING | String | Reading date in dd/mm/yyyy format. |
| DATA | String | Reading date in YYYY-MM-DD format. |
| MILIMETROS | Number | The day's rain, in millimeters. This is the precipitation field. |
| CLASSIFICACAO | String | Weather condition recorded with the reading. |
| TEMMAX TEMMIN UMIDADE |
Number | Maximum and minimum temperature and humidity — filled in when the gauge or the operator provides them. |
| USUARIO_NOME ID_USUARIO_UPCAMPO ID_USUARIO_REFERENCIA |
String | Who took the reading. |
| ORIGEM | String | Where the reading was entered: Android app, iPhone app, web portal or integration. |
| PLUVIOMETRO_DESCRICAO ID_PLUVIOMETRO_UPCAMPO ID_PLUVIOMETRO_REFERENCIA |
String | Gauge the reading came from. |
| PLUVIOMETRO_TIPO | String | Manual or automatic. |
curl -G https://api.upcampo.com.br/pluviometro_coleta \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'data_inicial=2024-08-01' \ --data-urlencode 'data_final=2024-08-31'
[
{
"ID_FILIAL": "F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F",
"ID_COLETA_UPCAMPO": "9B2D4A17-6C8E-4F51-8A03-1D7E5B9C2A64",
"ID_REFERENCIA": null,
"EXCLUIDO": false,
"DATA_MODIFICACAO": "2024-08-19T18:04:02.533",
"DATASTRING": "19/08/2024",
"DATA": "2024-08-19",
"MILIMETROS": 12.50,
"CLASSIFICACAO": "Chuvoso",
"TEMMAX": 31,
"TEMMIN": 19,
"UMIDADE": 78,
"USUARIO_NOME": "Admin",
"ID_USUARIO_UPCAMPO": "0dab044a-1e1e-4333-a39b-879e891fa086",
"ID_USUARIO_REFERENCIA": null,
"ORIGEM": "Android",
"PLUVIOMETRO_DESCRICAO": "Sede",
"ID_PLUVIOMETRO_UPCAMPO": "7C1F0B2E-4D33-42A8-9B10-5E7A6C3D9F41",
"ID_PLUVIOMETRO_REFERENCIA": "PLU-01",
"PLUVIOMETRO_TIPO": "Manual"
}
]
Complete rain gauge GET
/pluviometroCompletoThe rain gauge with the fields it covers and the readings for the period, nested, in a single call. It is the route for building the farm's rainfall map in one go: which gauge covers which field and how much it rained each day.
An empty TALHOES means the rain gauge is not linked to any field: its reading applies to the whole farm.
Parameters
| Option | Parameter | Notes |
|---|---|---|
| 1 | data_inicial | Reading date, in YYYY-MM-DD. Combines with data_final, which defaults to today. 366-day window; without both, the last 30 days. The period filters only the readings — the list of fields always comes complete. |
| 2 | id_upcampo | A specific rain gauge. Alternatives: id_referencia or codigo. |
| 3 | setor | Sector of the rain gauge. |
| 4 | id_talhao | Returns the rain gauges that cover this field, each still with the full list of its fields. |
Fields
| Field | Type | Notes |
|---|---|---|
| ID_PLUVIOMETRO_UPCAMPO ID_REFERENCIA CODIGO DESCRICAO TIPO SETOR LATITUDE LONGITUDE ATIVO EXCLUIDO DATA_MODIFICACAO |
— | The same fields as /pluviometro. |
| TALHOES | Array | Fields covered: ID_TALHAO_UPCAMPO, ID_TALHAO_REFERENCIA, TALHAO_CODIGO, TALHAO_DESCRICAO, TALHAO_DESCRICAO_SETOR (name already with the sector, ready to display) and SETOR. Empty = general rain gauge for the farm. |
| COLETAS | Array | Readings for the period, with the same fields as /pluviometro_coleta, without repeating the gauge data, which is already in the parent. |
curl -G https://api.upcampo.com.br/pluviometroCompleto \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'data_inicial=2024-08-01' \ --data-urlencode 'data_final=2024-08-31'
[
{
"ID_FILIAL": "F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F",
"ID_PLUVIOMETRO_UPCAMPO": "7C1F0B2E-4D33-42A8-9B10-5E7A6C3D9F41",
"ID_REFERENCIA": "PLU-01",
"EXCLUIDO": false,
"DATA_MODIFICACAO": "2024-08-19T10:22:41.120",
"CODIGO": "0001",
"DESCRICAO": "Sede",
"TIPO": "Manual",
"SETOR": "BOA VISTA",
"LATITUDE": -12.654321,
"LONGITUDE": -45.123456,
"ATIVO": true,
"TALHOES": [
{
"ID_TALHAO_UPCAMPO": "58637420-AF58-4BF5-9E6C-28E79078D263",
"ID_TALHAO_REFERENCIA": "1",
"TALHAO_CODIGO": "0001",
"TALHAO_DESCRICAO": "TH 01",
"TALHAO_DESCRICAO_SETOR": "BOA VISTA - TH 01",
"SETOR": "BOA VISTA"
}
],
"COLETAS": [
{
"ID_COLETA_UPCAMPO": "9B2D4A17-6C8E-4F51-8A03-1D7E5B9C2A64",
"ID_REFERENCIA": null,
"EXCLUIDO": false,
"DATA_MODIFICACAO": "2024-08-19T18:04:02.533",
"DATASTRING": "19/08/2024",
"DATA": "2024-08-19",
"MILIMETROS": 12.50,
"CLASSIFICACAO": "Chuvoso",
"TEMMAX": 31,
"TEMMIN": 19,
"UMIDADE": 78,
"USUARIO_NOME": "Admin",
"ID_USUARIO_UPCAMPO": "0dab044a-1e1e-4333-a39b-879e891fa086",
"ID_USUARIO_REFERENCIA": null,
"ORIGEM": "Android"
}
]
}
]
Scouting (IPM / pest monitoring)
Read-only routes. Scouting is created in the upCampo field app; the ERP only consumes it. A scouting record is a header (date + field) with four sets of children: the points visited, the plant phenology, the pest summary (the whole field) and the pest per point (the raw value at each stop).
The route name tells you the grain — how many lines it returns for the same scouting. Choosing the route is choosing the level of detail:
| Route | One line per… | Example |
|---|---|---|
| /levantamento | scouting (date + field) | 1 |
| /levantamento_ponto | sampling point, with scout and coordinates | 55 |
| /levantamento_fenologia | phenology type measured (stand, height, nodes) | 0 |
| /levantamento_praga_resumo | pest, consolidating all points | 4 |
| /levantamento_praga_ponto | pest × point, with the raw value entered | 11 |
The Example column is the response of one real scouting: 55 points visited, no phenology measurement recorded, 4 pests found in the field and 11 pest-per-point lines — 11 of the 220 possible combinations (55 × 4), because a line only exists where that pest was recorded at that point. The numbers change with each scouting: zero phenology only means that no one recorded stand, height or nodes that day.
The suffix is what separates the pair: _resumo is the whole scouting consolidated, _ponto is the same data broken down point by point. All of them require the token from POST /autenticar and use a 366-day window between data_inicial and data_final — the same exception as the rain routes, not the 7 days of the transaction routes. With no period given, they return the last 30 days.
With datmod_inicial and without data_inicial, the date window is not applied: everything that changed since the given timestamp comes back. Valid on the five list routes; /levantamentoCompleto does not accept datmod_inicial.
Including on the detail routes. Any change at any point of the scouting updates the header, and the whole scouting comes back in the next incremental synchronization — not just the line that changed.
There is no reference POST on these routes. The link is made through the field (ID_TALHAO_REFERENCIA), the season (ID_SAFRA_REFERENCIA) and, for pests, through PRAGA_CODIGO — the pest table has no ID_REFERENCIA.
Scouting GET
/levantamentoScouting header — one line per date + field, with how many points were visited, which scouts went to the field and the crop stage. It is the route to start with: the ID_LEVANTAMENTO_UPCAMPO from here is the id_levantamento of the detail routes.
Parameters
| Option | Parameter | Notes |
|---|---|---|
| 1 | data_inicial | Scouting date, in YYYY-MM-DD. Combines with data_final, which defaults to today. 366-day window; without both, the last 30 days. |
| 2 | datmod_inicial | Initial modification date, for incremental synchronization. Format YYYY-MM-DD HH:MM:SS; the time is optional. Without data_inicial, it skips the date window. |
| 3 | id_upcampo | A specific scouting. |
| 4 | id_talhao | Field in upCampo. Alternatives: id_talhao_referencia (the field id in your system) or codigo_talhao. |
| 5 | setor | Sector of the field. |
| 6 | id_safra | Season. Finer alternative: id_plantio, the season planting (season + field + variety). |
| 7 | id_cultura | Crop of the planting. |
Fields
| Field | Type | Notes |
|---|---|---|
| ID_LEVANTAMENTO_UPCAMPO | String | It is the id_levantamento of the detail routes. |
| DATA DATASTRING |
Date | Scouting date. DATASTRING comes in dd/mm/yyyy. |
| TOTAL_PONTOS | Integer | Points visited in the field that day. It is the divisor for the averages. |
| TECNICOS | String | Who went to the field. More than one scout on the same day and field closes a single scouting. |
| ID_SAFRA_UPCAMPO ID_SAFRA_REFERENCIA SAFRA ID_PLANTIO_UPCAMPO ID_PLANTIO_REFERENCIA |
String | Season and season planting of the scouting, with your system's identifier when there is one. |
| ID_TALHAO_UPCAMPO ID_TALHAO_REFERENCIA TALHAO_CODIGO TALHAO_DESCRICAO TALHAO_DESCRICAO_SETOR SETOR |
String | Field scouted. TALHAO_DESCRICAO_SETOR is the name already with the sector, ready to display. |
| ID_CULTURA_UPCAMPO ID_CULTURA_REFERENCIA CULTURA ID_VARIEDADE_UPCAMPO ID_VARIEDADE_REFERENCIA VARIEDADE |
String | Crop and variety planted. |
| ID_ESTAGIO_UPCAMPO ESTAGIO_CODIGO ESTAGIO |
String | Phenological stage of the crop on that date (e.g. V4). |
| EXCLUIDO DATA_MODIFICACAO |
Boolean / Date | Logical deletion and date of the last change, for incremental synchronization. |
curl -G https://api.upcampo.com.br/levantamento \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'data_inicial=2024-08-01' \ --data-urlencode 'data_final=2024-08-31'
[
{
"ID_FILIAL": "F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F",
"ID_LEVANTAMENTO_UPCAMPO": "3A9C7D51-8E24-4B6F-A017-2C5D8E9F1B03",
"EXCLUIDO": false,
"DATA_MODIFICACAO": "2024-08-19T18:41:07.220",
"DATA": "2024-08-19",
"DATASTRING": "19/08/2024",
"TOTAL_PONTOS": 10,
"TECNICOS": "Carlos Menezes",
"ID_SAFRA_UPCAMPO": "B1D7E902-3F45-4A18-9C26-7E0B4D8A5C31",
"ID_SAFRA_REFERENCIA": "SAF-2024",
"SAFRA": "2024/2025",
"ID_PLANTIO_UPCAMPO": "6E2A8B14-9D53-4C70-8F31-0A6B2C9D4E75",
"ID_PLANTIO_REFERENCIA": null,
"ID_TALHAO_UPCAMPO": "58637420-AF58-4BF5-9E6C-28E79078D263",
"ID_TALHAO_REFERENCIA": "1",
"TALHAO_CODIGO": "0001",
"TALHAO_DESCRICAO": "TH 01",
"TALHAO_DESCRICAO_SETOR": "BOA VISTA - TH 01",
"SETOR": "BOA VISTA",
"ID_CULTURA_UPCAMPO": "9F4B1C28-5D06-4E93-8A71-3B2E7D0C6A15",
"ID_CULTURA_REFERENCIA": "SOJA",
"CULTURA": "Soja",
"ID_VARIEDADE_UPCAMPO": "C3E5A719-2B84-4D06-9F13-8A0C5E7B2D46",
"ID_VARIEDADE_REFERENCIA": null,
"VARIEDADE": "TMG 7067",
"ID_ESTAGIO_UPCAMPO": "D7B2F408-1C36-4A95-8E20-5F9A3D6C8B14",
"ESTAGIO_CODIGO": "V4",
"ESTAGIO": "V4 - Terceiro trifólio"
}
]
Scouting points GET
/levantamento_pontoThe sampling points — one per point per scout, with the coordinates where they stopped. This is what lets you plot the scouting route on the field map.
Parameters
| Option | Parameter | Notes |
|---|---|---|
| 1 | data_inicial | With data_final. 366-day window; without both, the last 30 days. |
| 2 | datmod_inicial | Incremental synchronization, in YYYY-MM-DD HH:MM:SS. |
| 3 | id_levantamento | A single scouting. |
| 4 | id_talhao | Field. Also id_plantio and id_safra. |
| 5 | id_usuario | A specific scout. |
| 6 | ponto | The point number within the field. |
Fields
In addition to the scouting identification fields (date, season, planting and field):
| Field | Type | Notes |
|---|---|---|
| PONTO TIPO_LEVANTAMENTO |
Integer / String | Point number and the type of scouting done there. |
| ID_USUARIO_UPCAMPO ID_USUARIO_REFERENCIA TECNICO |
String | Who sampled. The user has an ID_REFERENCIA, so you can link it to the people records in your system. |
| STAND ALTURA QUANOS QUAPLA |
Number | The plant measurements at that point. The field consolidation is in /levantamento_fenologia, and the pests at that same point, in /levantamento_praga_ponto. |
| ID_ESTAGIO_UPCAMPO ESTAGIO |
String | Stage observed at the point. |
| LATITUDE LONGITUDE |
Number | Where the point was sampled. |
curl -G https://api.upcampo.com.br/levantamento_ponto \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'id_levantamento=3A9C7D51-8E24-4B6F-A017-2C5D8E9F1B03'
[
{
"ID_LEVANTAMENTO_UPCAMPO": "3A9C7D51-8E24-4B6F-A017-2C5D8E9F1B03",
"DATA": "2024-08-19",
"DATASTRING": "19/08/2024",
"ID_TALHAO_UPCAMPO": "58637420-AF58-4BF5-9E6C-28E79078D263",
"TALHAO_DESCRICAO_SETOR": "BOA VISTA - TH 01",
"PONTO": 1,
"TIPO_LEVANTAMENTO": "PLA",
"ID_USUARIO_UPCAMPO": "5D0B3E87-4A16-42C9-8F35-9B7E1C6A0D24",
"ID_USUARIO_REFERENCIA": "TEC-07",
"TECNICO": "Carlos Menezes",
"STAND": 12.2,
"ALTURA": 0.45,
"QUANOS": 8,
"QUAPLA": 10,
"ID_ESTAGIO_UPCAMPO": "D7B2F408-1C36-4A95-8E20-5F9A3D6C8B14",
"ESTAGIO": "V4 - Terceiro trifólio",
"LATITUDE": -12.654321,
"LONGITUDE": -45.123456
}
]
Scouting phenology GET
/levantamento_fenologiaThe plant data, not the pest data: stand, height, number of nodes, bolls. The scout records it along with the scouting, and upCampo returns the total and the average per point.
Parameters
| Option | Parameter | Notes |
|---|---|---|
| 1 | data_inicial | With data_final. 366-day window; without both, the last 30 days. |
| 2 | datmod_inicial | Incremental synchronization, in YYYY-MM-DD HH:MM:SS. |
| 3 | id_levantamento | A single scouting. |
| 4 | id_talhao | Field. Also id_plantio and id_safra. |
| 5 | tipo_fenologia | A specific type. Accepts it without accents. |
Fields
In addition to the scouting identification fields (date, season, planting, field and TOTAL_PONTOS):
| Field | Type | Notes |
|---|---|---|
| TIPO_FENOLOGIA | String | What was measured: STAND, ALTURA, QUANOS, QUAMAC, QUAMACPEQ, ALTPRINO and others, depending on the crop. |
| VALOR_TOTAL QUAPLA MEDIA_POR_PONTO UNIDADE |
Number / String | Total summed across the points, plants evaluated, average per point and the unit of measure. |
curl -G https://api.upcampo.com.br/levantamento_fenologia \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'id_levantamento=3A9C7D51-8E24-4B6F-A017-2C5D8E9F1B03'
[
{
"ID_LEVANTAMENTO_UPCAMPO": "3A9C7D51-8E24-4B6F-A017-2C5D8E9F1B03",
"DATA": "2024-08-19",
"DATASTRING": "19/08/2024",
"TOTAL_PONTOS": 10,
"ID_TALHAO_UPCAMPO": "58637420-AF58-4BF5-9E6C-28E79078D263",
"TALHAO_DESCRICAO_SETOR": "BOA VISTA - TH 01",
"TIPO_FENOLOGIA": "STAND",
"VALOR_TOTAL": 122,
"QUAPLA": 10,
"MEDIA_POR_PONTO": 12.2,
"UNIDADE": "plantas/metro"
}
]
Scouting pest — summary GET
/levantamento_praga_resumoPests, diseases, weeds and assessments found — one line per pest, size and predefined value in each scouting, consolidating all points visited. It is the field result: RESULTADO already comes with the pest's calculation formula applied, and this is the number compared against the control threshold. For the same data broken down point by point, see /levantamento_praga_ponto.
Parameters
| Option | Parameter | Notes |
|---|---|---|
| 1 | data_inicial | With data_final. 366-day window; without both, the last 30 days. |
| 2 | datmod_inicial | Incremental synchronization, in YYYY-MM-DD HH:MM:SS. |
| 3 | id_levantamento | The pests of a single scouting — the ID_LEVANTAMENTO_UPCAMPO from /levantamento. |
| 4 | id_talhao | Field. Also id_plantio and id_safra. |
| 5 | id_praga | A specific pest. Alternative: codigo_praga. |
| 6 | tipo | Praga (pest), Doença (disease), Erva daninha (weed) or Avaliação (assessment). Accepts them without accents. |
| 7 | alerta_cor | vermelho, amarelo or verde. |
Fields
In addition to the scouting identification fields — ID_LEVANTAMENTO_UPCAMPO, DATA, DATASTRING, DATA_MODIFICACAO, TOTAL_PONTOS and the season, planting and field ones —, the route returns:
| Field | Type | Notes |
|---|---|---|
| ID_PRAGA_UPCAMPO PRAGA_CODIGO PRAGA_DESCRICAO |
String | The pest. PRAGA_CODIGO is the linking key with your records — there is no pest ID_REFERENCIA. |
| PRAGA_COMPLETA | String | Text ready for display: pest + size + predefined value. E.g. Spodoptera frugiperda - Pequena. |
| TIPO | String | Praga, Doença, Erva daninha or Avaliação. The pest register is per farm: treat it as free text, not as a closed list. |
| ID_CLASSIFICACAO_UPCAMPO CLASSIFICACAO |
String | Pest class it belongs to. |
| ID_TAMANHO_UPCAMPO TAMANHO OPCAO_VALPRE |
String | Size (small, medium, large caterpillar) and predefined value option, when the pest is registered that way. They come null when not applicable. |
| FORMULA_CALCULO VALOR_TOTAL QUAPLA |
String / Number | How the result was obtained: the pest formula, the raw total summed across the points and the number of plants or meters evaluated. |
| RESULTADO | String | The calculated value with its unit (e.g. 15,0 %). It comes null when the pest only has a predefined value — in that case OPCAO_VALPRE provides it. |
| ALERTA_COR ALERTA_DESCRICAO |
String | vermelho (red, above the control threshold), amarelo (yellow, attention) or verde (green, ok). Null when the pest has no legend configured. |
| PRAGA_ORDEM TAMANHO_ORDEM VALPRE_ORDEM TIPO_LEVANTAMENTO |
Integer / String | The return order is that of the farm's register, in this sequence — never the alert order. |
curl -G https://api.upcampo.com.br/levantamento_praga_resumo \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'id_levantamento=3A9C7D51-8E24-4B6F-A017-2C5D8E9F1B03'
[
{
"ID_LEVANTAMENTO_UPCAMPO": "3A9C7D51-8E24-4B6F-A017-2C5D8E9F1B03",
"DATA": "2024-08-19",
"DATASTRING": "19/08/2024",
"TOTAL_PONTOS": 10,
"TIPO_LEVANTAMENTO": "PLA",
"ID_TALHAO_UPCAMPO": "58637420-AF58-4BF5-9E6C-28E79078D263",
"ID_TALHAO_REFERENCIA": "1",
"TALHAO_DESCRICAO_SETOR": "BOA VISTA - TH 01",
"ID_PRAGA_UPCAMPO": "4C8E0A96-7B31-4D25-9E48-1F6A3B5C7D09",
"PRAGA_CODIGO": "0012",
"PRAGA_DESCRICAO": "Spodoptera frugiperda",
"PRAGA_COMPLETA": "Spodoptera frugiperda - Pequena",
"TIPO": "Praga",
"PRAGA_ORDEM": 3,
"ID_CLASSIFICACAO_UPCAMPO": "8B1D5F73-6A29-4C84-9017-2E5B8D0A3C61",
"CLASSIFICACAO": "Lagartas",
"ID_TAMANHO_UPCAMPO": "2F7A9C34-0E85-4B16-8D93-5A1C6E0B4F27",
"TAMANHO": "Pequena",
"TAMANHO_ORDEM": 1,
"OPCAO_VALPRE": null,
"VALPRE_ORDEM": null,
"FORMULA_CALCULO": "Percentual de plantas atacadas",
"VALOR_TOTAL": 15,
"QUAPLA": 100,
"RESULTADO": "15,0 %",
"ALERTA_COR": "vermelho",
"ALERTA_DESCRICAO": "Acima do nível de controle"
}
]
Scouting pest — per point GET
/levantamento_praga_pontoThe same pest data as /levantamento_praga_resumo, broken down point by point: one line per point per pest and size. VALOR is the raw number entered in the field, without the calculation formula applied — the field's consolidated value is the one in the summary. Only combinations where the pest appeared are included, so the response is usually much smaller than points × pests.
The response multiplies point × pest. Without a field or scouting filter, it returns the whole period — always filter by id_levantamento or id_talhao.
Parameters
| Option | Parameter | Notes |
|---|---|---|
| 1 | id_levantamento | The recommended filter. |
| 2 | id_talhao | Field. Also id_plantio and id_safra. |
| 3 | data_inicial | With data_final. 366-day window; without both, the last 30 days. |
| 4 | datmod_inicial | Incremental synchronization, in YYYY-MM-DD HH:MM:SS. |
| 5 | id_praga | A pest. Alternatives: codigo_praga and tipo. |
| 6 | id_usuario | A scout. With ponto, you get down to a single line. |
Fields
The same pest fields as /levantamento_praga_resumo and the point fields of /levantamento_ponto, plus:
| Field | Type | Notes |
|---|---|---|
| VALOR | Number | What the scout entered at that point, without calculation. |
| RESULTADO_PONTO | String | Text ready to display: the chosen option when the pest has a predefined value, otherwise the number entered. |
| ID_VALPRE_UPCAMPO OPCAO_VALPRE VALPRE_ORDEM |
String / Integer | The predefined value option chosen at the point, when the pest is registered that way. |
| LATITUDE LONGITUDE |
Number | Coordinates of the point. |
curl -G https://api.upcampo.com.br/levantamento_praga_ponto \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'id_levantamento=3A9C7D51-8E24-4B6F-A017-2C5D8E9F1B03'
[
{
"ID_LEVANTAMENTO_UPCAMPO": "3A9C7D51-8E24-4B6F-A017-2C5D8E9F1B03",
"DATA": "2024-08-19",
"DATASTRING": "19/08/2024",
"TALHAO_DESCRICAO_SETOR": "BOA VISTA - TH 01",
"PONTO": 1,
"TIPO_LEVANTAMENTO": "PLA",
"ID_USUARIO_UPCAMPO": "5D0B3E87-4A16-42C9-8F35-9B7E1C6A0D24",
"ID_USUARIO_REFERENCIA": "TEC-07",
"TECNICO": "Carlos Menezes",
"ID_PRAGA_UPCAMPO": "4C8E0A96-7B31-4D25-9E48-1F6A3B5C7D09",
"PRAGA_CODIGO": "0012",
"PRAGA_DESCRICAO": "Spodoptera frugiperda",
"PRAGA_COMPLETA": "Spodoptera frugiperda - Pequena",
"TIPO": "Praga",
"PRAGA_ORDEM": 3,
"ID_CLASSIFICACAO_UPCAMPO": "8B1D5F73-6A29-4C84-9017-2E5B8D0A3C61",
"CLASSIFICACAO": "Lagartas",
"ID_TAMANHO_UPCAMPO": "2F7A9C34-0E85-4B16-8D93-5A1C6E0B4F27",
"TAMANHO": "Pequena",
"TAMANHO_ORDEM": 1,
"ID_VALPRE_UPCAMPO": null,
"OPCAO_VALPRE": null,
"VALPRE_ORDEM": null,
"FORMULA_CALCULO": "Percentual de plantas atacadas",
"VALOR": 2,
"QUAPLA": 10,
"RESULTADO_PONTO": "2",
"LATITUDE": -12.654321,
"LONGITUDE": -45.123456
}
]
Complete scouting GET
/levantamentoCompletoThe scouting as the parent, with the children nested — PRAGAS_RESUMO, FENOLOGIA and PONTOS — in a single call. It is the route for building the field's scouting report without crossing four queries. Each array has the name of the equivalent route: PRAGAS_RESUMO contains what /levantamento_praga_resumo would return for that scouting, and so on.
The pest broken down point by point multiplies point × pest and bloats the response. Pass incluir_praga_ponto=true to have it nested as well.
This route does not accept datmod_inicial — only a date filter. To synchronize what changed, use the five list routes.
Parameters
| Option | Parameter | Notes |
|---|---|---|
| 1 | data_inicial | With data_final, which defaults to today. 366-day window; without both, the last 30 days. |
| 2 | incluir_praga_ponto | true also returns the PRAGAS_PONTO array, with the pests point by point. |
| 3 | id_upcampo | A specific scouting. |
| 4 | id_talhao | Field. Alternatives: id_talhao_referencia, codigo_talhao and setor. |
| 5 | id_safra | Season. Finer alternative: id_plantio. |
Fields
| Field | Type | Notes |
|---|---|---|
| — | — | The same fields as /levantamento in the parent. |
| PRAGAS_RESUMO | Array | What was found in the field, with the fields of /levantamento_praga_resumo, without repeating the parent's identification. |
| FENOLOGIA | Array | Plant measurements, as in /levantamento_fenologia. |
| PONTOS | Array | Points visited, as in /levantamento_ponto. |
| PRAGAS_PONTO | Array | Only with incluir_praga_ponto=true. The pests point by point, as in /levantamento_praga_ponto. |
curl -G https://api.upcampo.com.br/levantamentoCompleto \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'data_inicial=2024-08-01' \ --data-urlencode 'data_final=2024-08-31' \ --data-urlencode 'incluir_praga_ponto=true'
[
{
"ID_FILIAL": "F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F",
"ID_LEVANTAMENTO_UPCAMPO": "3A9C7D51-8E24-4B6F-A017-2C5D8E9F1B03",
"EXCLUIDO": false,
"DATA_MODIFICACAO": "2024-08-19T18:41:07.220",
"DATA": "2024-08-19",
"DATASTRING": "19/08/2024",
"TOTAL_PONTOS": 10,
"TECNICOS": "Carlos Menezes",
"ID_SAFRA_REFERENCIA": "SAF-2024",
"SAFRA": "2024/2025",
"ID_TALHAO_REFERENCIA": "1",
"TALHAO_DESCRICAO_SETOR": "BOA VISTA - TH 01",
"CULTURA": "Soja",
"VARIEDADE": "TMG 7067",
"ESTAGIO": "V4 - Terceiro trifólio",
"PRAGAS_RESUMO": [
{
"PRAGA_CODIGO": "0012",
"PRAGA_COMPLETA": "Spodoptera frugiperda - Pequena",
"TIPO": "Praga",
"VALOR_TOTAL": 15,
"RESULTADO": "15,0 %",
"ALERTA_COR": "vermelho"
}
],
"FENOLOGIA": [
{
"TIPO_FENOLOGIA": "STAND",
"VALOR_TOTAL": 122,
"MEDIA_POR_PONTO": 12.2,
"UNIDADE": "plantas/metro"
}
],
"PONTOS": [
{
"PONTO": 1,
"TECNICO": "Carlos Menezes",
"STAND": 12.2,
"LATITUDE": -12.654321,
"LONGITUDE": -45.123456
}
],
"PRAGAS_PONTO": [
{
"PONTO": 1,
"PRAGA_CODIGO": "0012",
"PRAGA_COMPLETA": "Spodoptera frugiperda - Pequena",
"VALOR": 2,
"RESULTADO_PONTO": "2"
}
]
}
]
Product Class GETPOST
/classe_produtoThe class groups products by nature — input, fuel, part, lubricant, service. It decides how the product behaves in inventory and in costs, so register the class before the product.
GET parameters
| Parameter | Notes |
|---|---|
| id_upcampo | upCampo's internal identifier. |
| codigo | |
| id_referencia | Identifier in the partner's system. |
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| ID_REFERENCIA | String | Yes | Identifier in the third-party ERP. If upCampo finds it, it is an update; if not, it is a new record. |
| DESCRICAO | String | Yes | Class name. |
| CODIGO | String | — | |
| ATIVO | Boolean | — | true or false. |
| DELETADO | Boolean | — | Use true to send a deletion. |
curl -X POST https://api.upcampo.com.br/classe_produto \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d @classe.json
[
{
"ID_REFERENCIA": "1",
"CODIGO": "0001",
"DESCRICAO": "Classe integracao",
"ATIVO": true,
"DELETADO": false
}
]
[
{
"TABELA": "CLASSE",
"ID_UPCAMPO": "58637420-AF58-4BF5-9E6C-28E79078D263",
"ID_REFERENCIA": "1",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
}
]
Product GETPOST
/produtoThe product is the item that goes in and out of inventory: input, fuel, part — and also service. It is the most queried record in the integration, because the movement, the work order and the fueling all point to it.
GET parameters
| Parameter | Notes |
|---|---|
| id_upcampo | upCampo's internal identifier. |
| codigo | |
| id_referencia | Identifier in the partner's system. |
| id_classe | Filters by product class. |
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| ID_REFERENCIA | String | Yes | Identifier in the third-party ERP. If upCampo finds it, it is an update; if not, it is a new record. |
| DESCRICAO | String | Yes | Product name. |
| CODIGO | String | — | |
| MARCA | String | — | |
| CODUNI | String | — | Unit abbreviation. Example: KG. |
| ATIVO | Boolean | — | true or false. |
| NCM | String | — | |
| COMBUSTIVEL | Boolean | — | true or false. |
| SEMENTE | Boolean | — | true or false. |
| DELETADO | Boolean | — | Use true to send a deletion. |
| CLASSE_DESCRICAO | String | — | Description of the class in upCampo. |
| ID_CLASSE_UPCAMPO | String | — | Identifier of the class in upCampo. |
| ID_CLASSE_REFERENCIA | String | — | Identifier of the class in the third-party ERP. It must be mapped in the upCampo record so that its identifier can be found. |
curl -X POST https://api.upcampo.com.br/produto \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d @produto.json
[
{
"ID_REFERENCIA": "30",
"CODIGO": "0001",
"DESCRICAO": "TV 40 POLEGADA - TESTE INTEGRACAO 1",
"MARCA": "LG",
"CODUNI": "UN",
"ATIVO": true,
"DELETADO": false,
"ID_CLASSE_REFERENCIA": "25"
}
]
[
{
"TABELA": "PRODUTO",
"ID_UPCAMPO": "7E28F9F0-62BF-4C89-8D7F-84345CA5B183",
"ID_REFERENCIA": "30",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
}
]
Storage Location GET
/local_estoqueThe storage location is where the product is kept — input shed, diesel tank, warehouse. In upCampo, the balance and the average cost are per product and per location, not per product only; that is why almost every transaction route requires the location.
This route is read-only. To store your system's identifier, use /local_estoqueReferencia. Accepts the optional parameter setor.
Fields
| Field | Type | Notes |
|---|---|---|
| ID_UPCAMPO | String | Identifier in upCampo. |
| ID_REFERENCIA | String | Identifier in the third-party ERP. |
| DESCRICAO | String | Location name. |
| CODIGO | String | |
| ATIVO | Boolean | true or false. |
| DELETADO | Boolean | true or false. |
curl https://api.upcampo.com.br/local_estoque \ -H 'Authorization: Bearer $TOKEN'
[
{
"ID_UPCAMPO": "58637420-AF58-4BF5-9E6C-28E79078D263",
"ID_REFERENCIA": "1",
"CODIGO": "0001",
"DESCRICAO": "Barracao de Insumos",
"ATIVO": true,
"DELETADO": false
}
]
Equipment / Fleet / Asset GETPOST
/equipamentoOne screen for three things: fleet (what has an engine and wheels — tractor, harvester, truck), equipment (the towed implement) and asset (the farm's fixed assets and improvements). The TIPO field is what separates the three.
Accepts the optional parameter id_classificacao in the GET.
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| ID_REFERENCIA | String | Yes | Identifier in the third-party ERP. If upCampo finds it, it is an update; if not, it is a new record. |
| TIPO | String | Yes | Frota, Equipamento or Bem Feitoria. |
| DESCRICAO | String | Yes | Name. |
| CODIGO | String | — | Code. |
| PLACA | String | — | License plate. |
| CHASSI | String | — | Chassis number. |
| MODELO | String | — | Model. |
| MARCA | String | — | Brand. |
| ATIVO | Boolean | — | true or false. |
| DELETADO | Boolean | — | Use true to send a deletion. |
[
{
"ID_REFERENCIA": "1",
"TIPO": "Frota",
"CODIGO": "0001",
"DESCRICAO": "Trator 001",
"PLACA": "JHD-1234",
"CHASSI": "12345687",
"MODELO": "T20",
"MARCA": "JONH DEERE",
"ATIVO": true,
"DELETADO": false
}
]
[
{
"TABELA": "EQUIPAMENTO",
"ID_UPCAMPO": "659EAF57-7C02-4CEE-B063-17F05AB54624",
"ID_REFERENCIA": "1",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
}
]
Activity Type GET
/tipo_atividadeThe activity type is what the work order does: pesticide application, fertilization, planting, harvest. It is what work orders are filtered by (id_tipati or id_tipati_referencia).
Fields
| Field | Type | Notes |
|---|---|---|
| ID | String | Identifier in upCampo. |
| ID_REFERENCIA | String | Identifier in the third-party ERP. |
| DESCRICAO | String | Activity type name. |
| CODIGO | String | |
| ATIVO | Boolean | true or false. |
| CLASSIFICACAO | String | A standard classification for the activity type. |
To store your ERP's identifier, use /tipo_atividadeReferencia.
[
{
"ID_REFERENCIA": "1",
"ID": "1asd-1023-s344-1233-1233",
"CODIGO": "0001",
"DESCRICAO": "Aplicação de Defensivo Terreste",
"ATIVO": true,
"CLASSIFICACAO": "Aplicação de Defensivo"
}
]
Short Identification GET
/identificacao_resumidaIde. Res. is how the web portal abbreviates Identificação Resumida (Short Identification) — also called IDERES. It is a kind of subgroup of the activity type: within "Pesticide application", for example, it distinguishes "1 FUNGICIDA" from "INSETICIDA".
Fields
| Field | Type | Notes |
|---|---|---|
| ID | String | Identifier in upCampo. |
| ID_REFERENCIA | String | Identifier in the third-party ERP. |
| DESCRICAO | String | Short identification name. |
| CODIGO | String | |
| ATIVO | Boolean | true or false. |
[
{
"ID_REFERENCIA": "1",
"ID": "1asd-1023-s344-1233-1233",
"CODIGO": "0001",
"DESCRICAO": "1 FUNGICIDA",
"ATIVO": true
}
]
Movement (invoice) GETPOST
/movimentacaoThe movement is the entry of an invoice into the farm's inventory — and not only for products: service invoices (freight, outside maintenance, third-party application) also come in here. It is what forms the average cost of each product in each storage location.
GET parameters
Three mutually exclusive options:
| Option | Parameter | Notes |
|---|---|---|
| 1 | datmod_inicial | Initial modification date. Format YYYY-MM-DD HH:MM:SS — e.g. 2024-03-15 07:00:00. The time is optional; without it, it applies from midnight.Can be combined with data_inicial + data_final — the document date, in YYYY-MM-DD, maximum window of 7 days — and with status (Finalizado or Pendente). |
| 2 | numero | Invoice number. |
| 3 | id_referencia | Identifier in the partner's system. |
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| Header | |||
| ID_REFERENCIA | String | Yes | Identifier in the third-party ERP. If upCampo finds it, it is an update; if not, it is a new record. |
| NUMERO | String | Yes | Invoice number. |
| DATA | String | Yes | Format YYYY-MM-DD — e.g. 2024-08-19. |
| CNPJCPF | String | Yes | CNPJ or CPF (Brazilian company or individual taxpayer ID) of the issuer. If upCampo does not find it, the issuer is added automatically to its database. |
| RAZSOC | String | Yes | Legal name of the issuer. |
| NOMFAN | String | — | Trade name of the issuer. |
| CODFOR | String | — | Code of the issuer's record in the partner's system. |
| CHANFE | String | — | NF-e (Brazilian electronic invoice) access key. |
| VALTOT | Number | Yes | Total invoice amount. |
| VALDES | Number | — | Total discounts. |
| VALFRE | Number | — | Total freight. |
| VALLIQ | Number | Yes | Final net amount, after discounts. |
| DELETADO | Boolean | — | Use true to send a deletion. |
| ITENS | Array | Yes | The invoice items. |
| Items | |||
| ID_REFERENCIA | String | Yes | Identifier of the item in the third-party ERP. |
| ID_PRODUTO_REFERENCIA | String | Yes | Identifier of the product in the third-party ERP, mapped in the upCampo record. |
| ID_LOTE_REFERENCIA | String | — | Identifier of the lot in the third-party ERP, mapped in the upCampo record. |
| DATVEN | String | — | Lot expiration date (if there is a lot), YYYY-MM-DD format. |
| NUMLOT | String | — | Lot number or code (if there is a lot). |
| ID_LOCEST_REFERENCIA | String | One or the other | Identifier of the storage location in the third-party ERP, mapped in the upCampo record. |
| ID_EQUIPAMENTO_REFERENCIA | String | One or the other | Identifier of the equipment or fleet in the third-party ERP — use it when the cost is posted directly to a fleet unit instead of going into inventory. |
| CODUNI | String | — | Unit abbreviation. Example: KG. |
| QUANTIDADE | Number | Yes | Product quantity. |
| VALUNI | Number | Yes | Product unit price. |
| VALTOT | Number | Yes | Product total amount. |
| VALDES | Number | — | Product discount amount. |
| VALFRE | Number | — | Product freight amount. |
| VALLIQ | Number | Yes | Final net amount, after discounts. |
| DELETADO | Boolean | — | Use true to send a deletion. |
curl -G https://api.upcampo.com.br/movimentacao \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'datmod_inicial=2023-06-01 09:00:00' \ --data-urlencode 'status=Finalizado'
[
{
"ID_REFERENCIA": "2",
"NUMERO": "0002",
"DATA": "2024-4-27",
"DATEMI": "2024-4-01",
"CNPJCPF": "0123",
"RAZSOC": "NOVO INTEGRACAO",
"NOMFAN": "NOVO IN",
"CHANFE": "5555.44444.5555.6666.9999.99999",
"VALTOT": 200.50,
"VALDES": 0,
"VALFRE": 0,
"VALLIQ": 200.50,
"DELETADO": false,
"ITENS": [
{
"ID_REFERENCIA": "A",
"ID_PRODUTO_REFERENCIA": "1",
"ID_LOCEST_REFERENCIA": "1010101",
"QUANTIDADE": 40,
"VALUNI": 2,
"VALTOT": 40,
"VALLIQ": 40
}
]
}
]
[
{
"TABELA": "CABECALHO",
"ID_UPCAMPO": "86F44591-D8D7-465D-BB86-5EA461B63E7D",
"ID_REFERENCIA": "2",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
},
{
"TABELA": "DETALHE",
"ID_UPCAMPO": "E9A93574-C4BF-4DA7-8F23-E3D3E0FF816A",
"ID_REFERENCIA": "A",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
}
]
Transfer Between Storage Locations GETPOST
/transferenciaThe transfer moves balance from one storage location to another, without an invoice — from the central shed to the unit's shed, for example. The document has a header and items.
GET parameters
| Parameter | Required | Notes |
|---|---|---|
| data_inicial | Yes | Format YYYY-MM-DD — e.g. 2024-08-19. Maximum window of 7 days between the two. |
| data_final | Yes | |
| status | — | Finalizado or Pendente. |
| codigo | — | |
| id_referencia | — | |
| id_upcampo | — | |
| id_local_origem | — | |
| id_local_destino | — |
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| Header | |||
| ID_REFERENCIA | String | Yes | Identifier in the third-party ERP. |
| DATA | String | Yes | Format YYYY-MM-DD — e.g. 2024-08-19. |
| ID_LOCESTORI_REFERENCIA | String | Yes | Source storage location, in the third-party ERP, mapped in upCampo. |
| ID_LOCESTDES_REFERENCIA | String | Yes | Destination storage location, in the third-party ERP, mapped in upCampo. |
| NUMEXT | String | — | Document code or number in the third-party ERP. |
| QUEMRECEBEU | String | — | Name of the person who received it. |
| QUEMENTREGOU | String | — | Name of the person who delivered it. |
| NUMNF | String | — | Invoice number. |
| OBSERVACAO | String | — | |
| DELETADO | Boolean | — | Use true to send a deletion. |
| ITENS | Array | Yes | The transfer items. |
| Items | |||
| ID_REFERENCIA | String | — | Identifier of the item in the third-party ERP. |
| ID_PRODUTO_REFERENCIA | String | Yes | Identifier of the product in the third-party ERP, mapped in upCampo. |
| ID_LOTE_REFERENCIA | String | — | Identifier of the lot in the third-party ERP, mapped in upCampo. |
| QUANTIDADE | Number | Yes | |
| VALUNI | Number | Yes | |
| VALLIQ | Number | Yes | |
| DELETADO | Boolean | — | Use true to send a deletion. |
A finalized transfer cannot be changed — the response comes with "MENSAGEM": "Documento finalizado não pode ser alterado" (finalized document cannot be changed). And upCampo blocks any operation that would leave the source balance negative.
[
{
"ID_REFERENCIA": "21",
"DATA": "2023-3-27",
"ID_LOCESTORI_REFERENCIA": "1010101",
"ID_LOCESTDES_REFERENCIA": "2010101",
"NUMEXT": "0021",
"QUEMENTREGOU": "José",
"QUEMRECEBEU": "João",
"NUMNF": "00158",
"ITENS": [
{
"ID_REFERENCIA": "21_A",
"ID_PRODUTO_REFERENCIA": "1",
"QUANTIDADE": 5,
"VALUNI": 2,
"VALLIQ": 10
}
]
}
]
[
{
"TABELA": "CABECALHO",
"ID_UPCAMPO": "B674DF03-052C-427D-9CCD-FFA553F88D18",
"ID_REFERENCIA": "21",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
},
{
"TABELA": "DETALHE",
"ID_UPCAMPO": "F1692266-457D-4B86-A33C-3381F0F5FF56",
"ID_REFERENCIA": "21_A",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
}
]
[
{
"ID_FILIAL": "F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F",
"ID_TRANSFERENCIA_UPCAMPO": "1AA818E8-0B7C-44D2-81F0-7155AB00127C",
"ID_REFERENCIA": "12345",
"EXCLUIDO": false,
"CODIGO": "0011",
"NUMEXT": null,
"DATA_MODIFICACAO": "2024-04-30T15:47:01.697",
"DATASTRING": "30/04/2024",
"DATA": "2024-04-30",
"STATUS": "Finalizado",
"USUARIO_NOME": "Admin",
"ID_USUARIO_UPCAMPO": "0dab044a-1e1e-4333-a39b-879e891fa086",
"OBSERVACAO": "OBSERVACAO",
"NUMNF": "001",
"ENTREGADOR": "CARLOS",
"RECEBEDOR": "MARCOS",
"LOCESTORI_DESCRICAO": "Algodoeira",
"ID_LOCESTORI_UPCAMPO": "C02A3653-849B-4C3D-894E-FBFE4FFCF479",
"ID_LOCESTORI_REFERENCIA": "1010101",
"LOCESTDES_DESCRICAO": "Algodoeira",
"ID_LOCESTDES_UPCAMPO": "C02A3653-849B-4C3D-894E-FBFE4FFCF479",
"ID_LOCESTDES_REFERENCIA": "1010101",
"itens": [
{
"ID_TRANSFERENCIA_DETALHE_UPCAMPO": "F090E396-1E96-4D49-80FE-655CAE2AB309",
"ID_REFERENCIA_DETALHE": null,
"EXCLUIDO_DETALHE": false,
"PRODUTO_DESCRICAO": "Algodao em Pluma 01",
"ID_PRODUTO_UPCAMPO": "D236201E-BACA-4D14-9D10-F4374B46D17A",
"ID_PRODUTO_REFERENCIA": "1",
"ID_LOTE_UPCAMPO": null,
"ID_LOTE_REFERENCIA": null,
"PRODUTO_UNIDADE": "KG - Quilograma",
"PRODUTO_CODUNI": "KG",
"QUANTIDADE": 6.000000
}
]
}
]
Inventory count POST
/inventarioThe inventory count adjusts the balance of a product in a storage location: instead of posting an entry or an exit, you state what the correct balance is on that date. Use it at the season changeover and when physically counting the warehouse.
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| ID_REFERENCIA | String | Yes | Identifier in the third-party ERP. If upCampo finds it, it is an update; if not, it is a new record. |
| ID_PRODUTO_REFERENCIA | String | Yes* | Identifier of the product in the third-party ERP, mapped in upCampo. |
| ID_PRODUTO_UPCAMPO | String | Yes* | Identifier of the product in upCampo — use it when ID_PRODUTO_REFERENCIA is null. |
| ID_LOTE_REFERENCIA | String | — | Identifier of the lot in the third-party ERP, mapped in upCampo. |
| ID_LOTE_UPCAMPO | String | — | Identifier of the lot in upCampo, when there is no reference. |
| ID_LOCEST_REFERENCIA | String | Yes* | Identifier of the storage location in the third-party ERP, mapped in upCampo. |
| ID_LOCEST_UPCAMPO | String | Yes* | Identifier of the location in upCampo — use it when ID_LOCEST_REFERENCIA is null. |
| DATA | String | — | Format YYYY-MM-DD — e.g. 2024-08-19. |
| SALDO | Number | Yes | Product balance. |
| VALUNI | Number | — | Product unit price. |
| VALTOT | Number | — | Product total amount. |
* Send the reference or the upCampo identifier — one of the two.
[
{
"ID_REFERENCIA": "1",
"ID_PRODUTO_REFERENCIA": "1",
"ID_LOCEST_REFERENCIA": "1010101",
"DATA": "2023-02-01",
"SALDO": 20.00,
"VALUNI": "30.00",
"VALTOT": "600.00"
}
]
[
{
"TABELA": "INVENTARIO",
"ID_UPCAMPO": "7E28F9F0-62BF-4C89-8D7F-84345CA5B183",
"ID_REFERENCIA": "1",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
}
]
Inventory balance GET
/estoqueReturns the current balance per product and storage location — this is how upCampo controls inventory, and that is why the same product can have different balances in different sheds.
Parameters
| Parameter | Notes |
|---|---|
| id_locest_referencia | Filters by storage location. |
| id_produto_referencia | Filters by product. |
Fields
| Field | Type | Notes |
|---|---|---|
| ID_ESTOQUE_UPCAMPO | String | Identifier of the inventory line in upCampo. |
| LOCEST_DESCRICAO | String | Description of the storage location in upCampo. |
| ID_LOCEST_UPCAMPO | String | Identifier of the location in upCampo. |
| ID_LOCEST_REFERENCIA | String | Identifier of the location in the third-party ERP. |
| PRODUTO_DESCRICAO | String | Description of the product in upCampo. |
| ID_PRODUTO_UPCAMPO | String | Identifier of the product in upCampo. |
| ID_PRODUTO_REFERENCIA | String | Identifier of the product in the third-party ERP. |
| SALDO | Number | Current balance. |
curl 'https://api.upcampo.com.br/estoque?id_locest_referencia=38' \ -H 'Authorization: Bearer $TOKEN'
[
{
"ID_ESTOQUE_UPCAMPO": "0F5D3D06-7BB1-4A2E-9A05-5D6E5F0C61A3",
"LOCEST_DESCRICAO": "FUM - DIESEL",
"ID_LOCEST_UPCAMPO": "23C7A375-B67B-42BC-ABD9-6577F075A26A",
"ID_LOCEST_REFERENCIA": "38",
"PRODUTO_DESCRICAO": "DIESEL S10",
"ID_PRODUTO_UPCAMPO": "F44E08B3-4A0F-4A35-99AD-1E66418611D9",
"ID_PRODUTO_REFERENCIA": "1201",
"SALDO": 12450.000000
}
]
Agricultural work order — complete GET
/ordem_agricola_completaThe work order is the document that records what was applied, on which fields and by whom. This route returns everything in a single object: header + products + fields + executions. It is the right choice when the ERP wants the whole order in one read.
The quantity of each product is posted for the whole order (QUANTIDADE_TOTAL_PRODUTO) and split among the fields according to each one's area. That is why the order carries the total area (ARETOT) and the area of each field (AREA).
Parameters
| Option | Parameter | Notes |
|---|---|---|
| 1 | data_inicial + data_final | Format YYYY-MM-DD — e.g. 2024-08-19. Can be combined with id_tipati, id_tipati_referencia and status (Finalizado or Pendente). |
| 2 | codigo | Order code in upCampo. |
| 3 | id_referencia | Identifier in the partner's system. |
Example: ?data_inicial=2023-06-01&data_final=2023-06-30&status=Finalizado
Use POST /ordem_agricola_completaReferencia with id_upcampo, id_referencia and, optionally, codSai — the latter for when the code generated in the partner's system differs from the order code in upCampo.
Fields
| Field | Type | Notes |
|---|---|---|
| Order header | ||
| ID_ORDSER_UPCAMPO | String | Identifier of the work order in upCampo. |
| ID_REFERENCIA | String | Identifier in the third-party ERP, mapped in the upCampo record. |
| CODIGO | String | Order code or number in upCampo. |
| SEQUENCIAL | Integer | Works as a numeric identifier, for partners that cannot work with text identifiers. |
| DELETADO | Boolean | |
| DATPRESTRING | String | Planned date, in dd/mm/yyyy format. |
| DATPRE | String | Planned date, in YYYY-MM-DD format. |
| DATFINSTRING | String | Completion date, in dd/mm/yyyy format. |
| DATFIN | String | Completion date, in YYYY-MM-DD format. |
| ARETOT | Number | Total area of the order, in hectares. |
| AREEXE | Number | Total area executed, in hectares. |
| STATUS | String | Pendente or Finalizado. |
| TIPAPL | String | Pesticide application type: Terrestre (ground) or Aérea (aerial). |
| USUARIO_NOME ID_USUARIO_UPCAMPO ID_USUARIO_REFERENCIA |
String | Who created it — name, identifier in upCampo and identifier in the third-party ERP. |
| USUARIO_FINALIZOU_NOME ID_USUARIO_FINALIZOU_UPCAMPO ID_USUARIO_FINALIZOU_REFERENCIA |
String | Who finalized it — name, identifier in upCampo and identifier in the third-party ERP. |
| TIPATI_DESCRICAO ID_TIPATI_UPCAMPO ID_TIPATI_REFERENCIA |
String | Activity type. |
| IDERES_DESCRICAO ID_IDERES_UPCAMPO ID_IDERES_REFERENCIA |
String | Short identification, a kind of subgroup of the activity type. |
| EQUIPE_DESCRICAO ID_EQUIPE_UPCAMPO ID_EQUIPE_REFERENCIA |
String | Team that carried it out. |
| SAFRA_DESCRICAO SAFRA_ID_UPCAMPO ID_SAFRA_REFERENCIA |
String | Season of the order. |
| ID_CICLO_REFERENCIA | String | Identifier of the cycle in the third-party ERP. |
| Group — products | ||
| LOCEST_DESCRICAO ID_LOCEST_UPCAMPO ID_LOCEST_REFERENCIA |
String | Storage location the product came out of. |
| PRODUTO_DESCRICAO ID_PRODUTO_UPCAMPO ID_PRODUTO_REFERENCIA |
String | Product applied. |
| LOTE_DESCRICAO ID_LOTE_UPCAMPO ID_LOTE_REFERENCIA |
String | Lot, when the product is lot-controlled. |
| PRODUTO_UNIDADE | String | Full unit (code + description). |
| PRODUTO_CODUNI | String | Unit abbreviation. |
| QUANTIDADE_TOTAL_PRODUTO | Number | Item quantity, gross, undivided. |
| DOSE_INDIVIDUAL | Number | Item rate, gross, undivided. |
| Group — fields | ||
| TALHAO_DESCRICAO ID_TALHAO_UPCAMPO ID_TALHAO_REFERENCIA |
String | Field included in the order. |
| TALHAO_SETOR | String | |
| ID_SETOR_REFERENCIA | String | Identifier in the third-party ERP. Tip: if the ERP uses several branches and upCampo does not, do the mapping here. |
| AREA | Number | Area in hectares of that field in the order. |
| VARIEDADE_DESCRICAO ID_VARIEDADE_UPCAMPO ID_VARIEDADE_REFERENCIA |
String | Variety planted. |
| CULTURA_DESCRICAO ID_CULTURA_UPCAMPO ID_CULTURA_REFERENCIA |
String | Crop. |
| SAFRA_DESCRICAO ID_SAFRA_REFERENCIA |
String | Season of the field. |
| ID_PLANTIO_SAFRA_UPCAMPO ID_PLANTIO_SAFRA_REFERENCIA |
String | Corresponding season planting. |
| Group — executions | ||
| ID_EXECUCAO_UPCAMPO | String | Internal identifier of the execution in upCampo. |
| DATASTRING | String | Execution date, in dd/mm/yyyy format. |
| DATA | String | Execution date, in YYYY-MM-DD format. |
| HORA_INICIO / MINUTO_INICIO | String | Start of the execution. |
| HORA_FIM / MINUTO_FIM | String | End of the execution. |
| AREA | Number | Area in hectares of the execution. |
| EQUIPAMENTO_DESCRICAO ID_EQUIPAMENTO_UPCAMPO ID_EQUIPAMENTO_REFERENCIA |
String | Equipment used. |
| LEIINI | Number | Initial reading (hour meter or km). |
| LEIFIN | Number | Final reading (hour meter or km). |
| QUAHOR | Number | Number of hours. |
| FUNCIONARIO_NOME ID_FUNCIONARIO_UPCAMPO ID_FUNCIONARIO_REFERENCIA |
String | Employee who carried it out. |
| ID_FUNCIONARIOS_AGRUPADOS | String | Grouped identifiers, when more than one employee takes part in the same execution — separated by semicolons. |
curl 'https://api.upcampo.com.br/ordem_agricola_completa?data_inicial=2023-06-01&data_final=2023-06-30&status=Finalizado' \ -H 'Authorization: Bearer $TOKEN'
[
{
"ID_FILIAL": "DE319CA8-601F-4E68-978D-D0FB0DC27457",
"ID_ORDSER_UPCAMPO": "io0wrnIjESTkkvAGkrlY",
"CODIGO": "0570",
"DATPRESTRING": "24/05/2023",
"DATPRE": "2023-05-24",
"DATFINSTRING": "24/05/2023",
"DATFIN": "2023-05-24T00:00:00.000Z",
"ARETOT": 142,
"AREEXE": 142,
"STATUS": "Finalizado",
"ID_SAIDA_UPCAMPO": "0B94079D-8D3A-4FE2-B1F5-B0D36F3579BC",
"ID_SAIDA_REFERENCIA": "11556",
"LOCEST_DESCRICAO": "FUM - DEFENSIVOS",
"ID_LOCEST_UPCAMPO": "B203B099-9AB2-4379-89FD-52D788E73F9C",
"ID_LOCEST_REFERENCIA": "12",
"PRODUTO_DESCRICAO": "BRAVONIL 720",
"ID_PRODUTO_UPCAMPO": "BC8DC697-9673-4636-B78D-370926042403",
"ID_PRODUTO_REFERENCIA": "330",
"ID_LOTE_UPCAMPO": null,
"ID_LOTE_REFERENCIA": null,
"QUANTIDADE_PROPORCIONAL": 93.8,
"QUANTIDADE_TOTAL_PRODUTO": 198.8,
"DOSE_INDIVIDUAL": 1.4,
"TALHAO_DESCRICAO": "16 - UNIAO",
"ID_TALHAO_UPCAMPO": "CA7742B0-AA38-4A37-A77C-10F214AED03D",
"ID_TALHAO_REFERENCIA": "1",
"AREA": 67,
"VARIEDADE_DESCRICAO": "FM 985 GLTP",
"ID_VARIEDADE_UPCAMPO": "9D6D9741-AFEB-4405-BACD-4C7341EC8006",
"ID_VARIEDADE_REFERENCIA": "1",
"CULTURA_DESCRICAO": "ALGODAO",
"ID_CULTURA_UPCAMPO": "5795CCB1-44FC-44B8-AAB9-0DBDD4182E68",
"ID_CULTURA_REFERENCIA": "1",
"SAFRA_DESCRICAO": "ALGODAO E MILHO 2023",
"ID_SAFRA_REFERENCIA": "1",
"ID_PLANTIO_SAFRA_UPCAMPO": "592D56A2-2A71-4DD0-953B-F3020A142B5B",
"ID_PLANTIO_SAFRA_REFERENCIA": "1",
"TIPATI_DESCRICAO": "Aplicação de defensivo",
"ID_TIPATI_UPCAMPO": "8650A085-15E2-4877-A7DA-92A52D112463",
"ID_TIPATI_REFERENCIA": "1",
"IDERES": "FUNGICIDA + INSET",
"EQUIPE_DESCRICAO": "UNIAO - APL TERRESTRE",
"ID_EQUIPE_UPCAMPO": "938C2A4C-035E-478A-866C-B200B42300D9",
"ID_EQUIPE_REFERENCIA": "1"
}
]
Work order — inputs / product GET
/ordem_agricola_insumoReturns the work order with the header and three nested lists: produtos, talhoes and execucoes. It is the route used to carry the crop's input write-off into the ERP's inventory.
Parameters
| Option | Parameter | Notes |
|---|---|---|
| 1 | datmod_inicial | Initial modification date. Format YYYY-MM-DD HH:MM:SS — e.g. 2024-03-15 07:00:00. The time is optional; without it, it applies from midnight.Can be combined with data_inicial + data_final — the document date, in YYYY-MM-DD —, id_tipati, id_tipati_referencia and status. |
| 2 | codigo | Order code in upCampo. |
| 3 | id_referencia | Identifier in the partner's system. |
Example: ?datmod_inicial=2023-06-01 09:00:00&status=Finalizado
Fields specific to this route
The header is the same as in the complete order. In addition:
| Field | Type | Notes |
|---|---|---|
| EXCLUIDO | Boolean | |
| CODIGO_SAIDA_UPCAMPO | String | Work order code plus the unique field × product sequence. |
| ID_SAIDA_UPCAMPO | String | Internal identifier of the outflow in upCampo. |
| ID_SAIDA_REFERENCIA | String | Identifier of the outflow in the third-party ERP, mapped in upCampo. Store it with /ordem_agricola_insumoReferencia. |
| QUANTIDADE_PROPORCIONAL | Number | Item quantity already split in proportion to the field's area relative to the order's total area. |
| QUANTIDADE_TOTAL_PRODUTO | Number | Item quantity, gross, undivided. |
| DOSE_INDIVIDUAL | Number | Item rate, gross, undivided. |
QUANTIDADE_TOTAL_PRODUTO is what left inventory for the whole order. QUANTIDADE_PROPORCIONAL is that field's share. Add up the proportional quantities and you get the total — do not post both.
[
{
"ID_FILIAL": "F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F",
"ID_ORDSER_UPCAMPO": "11F66754-1A1A-469B-BC39-1F96C8EBA897",
"CODIGO": "0632",
"DATA_MODIFICACAO": "2023-06-29T17:14:30.363",
"DATPRESTRING": "19/06/2023",
"DATPRE": "2023-06-19",
"DATFINSTRING": "19/06/2023",
"DATFIN": "2023-06-19",
"ARETOT": 652.000000,
"AREEXE": 652.000000,
"STATUS": "Finalizado",
"TIPAPL": "Terrestre",
"TIPATI_DESCRICAO": "Aplicação de defensivo",
"ID_TIPATI_UPCAMPO": "FC35C6B4-6512-4F58-BEA2-CCAA6BFED487",
"ID_TIPATI_REFERENCIA": "3",
"IDERES_DESCRICAO": "INSETICIDA ",
"ID_IDERES_UPCAMPO": "7FE2669B-2820-45E8-83E2-40B74851A7D3",
"ID_IDERES_REFERENCIA": "55",
"EQUIPE_DESCRICAO": "UNIAO - APL TERRESTRE",
"ID_EQUIPE_UPCAMPO": "D0C6C6C4-B15B-49C3-817D-EE88ACFDF2B1",
"ID_EQUIPE_REFERENCIA": "10",
"produtos": [
{
"LOCEST_DESCRICAO": "FCO - DEFENSIVOS",
"ID_LOCEST_UPCAMPO": "92F51139-05BA-4C62-99A7-7597587CCFD2",
"ID_LOCEST_REFERENCIA": "103",
"PRODUTO_DESCRICAO": "DISPERSE ULTRA",
"ID_PRODUTO_UPCAMPO": "2FDA9A05-7002-4B27-A190-8E511531976D",
"ID_PRODUTO_REFERENCIA": "609",
"ID_LOTE_UPCAMPO": "null",
"ID_LOTE_REFERENCIA": "null",
"ARETOT": 652.0000,
"QUANTIDADE_TOTAL_PRODUTO": 13.0400,
"DOSE_INDIVIDUAL": 0.0200
},
{
"LOCEST_DESCRICAO": "FCO - DEFENSIVOS",
"ID_LOCEST_UPCAMPO": "92F51139-05BA-4C62-99A7-7597587CCFD2",
"ID_LOCEST_REFERENCIA": "103",
"PRODUTO_DESCRICAO": "MARSHAL",
"ID_PRODUTO_UPCAMPO": "BDA4D865-784E-4B71-94E8-7BA69F53F433",
"ID_PRODUTO_REFERENCIA": "666",
"ID_LOTE_UPCAMPO": "null",
"ID_LOTE_REFERENCIA": "null",
"ARETOT": 652.0000,
"QUANTIDADE_TOTAL_PRODUTO": 260.0000,
"DOSE_INDIVIDUAL": 0.3988
}
],
"talhoes": [
{
"TALHAO_DESCRICAO": "18",
"SETOR": "UNIAO",
"ID_SETOR_REFERENCIA": "10",
"ID_TALHAO_UPCAMPO": "D7DC95FD-ABB2-4FBF-9076-2A598809DE35",
"ID_TALHAO_REFERENCIA": "130",
"AREA": 101.000000,
"VARIEDADE_DESCRICAO": "FM 985 GLTP",
"ID_VARIEDADE_UPCAMPO": "CEF765F5-476D-45EA-AA19-1B4811492395",
"ID_VARIEDADE_REFERENCIA": "18",
"CULTURA_DESCRICAO": "ALGODAO",
"ID_CULTURA_UPCAMPO": "E4B14FA0-807D-4A82-B9E3-A116BB72CA87",
"ID_CULTURA_REFERENCIA": "1",
"SAFRA_DESCRICAO": "Safra 01",
"ID_SAFRA_UPCAMPO": "E95AD81A-E30A-4AF4-99D1-F21FE86997FD",
"ID_SAFRA_REFERENCIA": "2",
"ID_PLANTIO_SAFRA_UPCAMPO": "591E5517-848C-4135-B018-9C5E3C1F5831",
"ID_PLANTIO_SAFRA_REFERENCIA": "null"
}
],
"execucoes": [
{
"ID_EXECUCAO_UPCAMPO": "9693EB90-CB9F-4E1B-ABC9-ACDFDA75D9F8_DEF63419-DD18-4D7E-81C5-9578ACD5787A",
"DATASTRING": "19/06/2023",
"DATA": "2023-06-19",
"AREA": 67.0000000,
"LEIINI": 0.0,
"LEIFIN": 0.0,
"QUAHOR": 0.0000,
"EQUIPAMENTO_DESCRICAO": "0235 - 0235 - PULVERIZADOR M4030 - JOHN DEER - 035",
"ID_EQUIPAMENTO_UPCAMPO": "C0E6E02A-06A2-47EF-A9ED-EC15352053D0",
"ID_EQUIPAMENTO_REFERENCIA": "9",
"FUNCIONARIO_NOME": "OPERADOR 01",
"ID_FUNCIONARIO_UPCAMPO": "297ACD8A-4241-4A70-A02B-2DED72A0E47E",
"ID_FUNCIONARIO_REFERENCIA": "null",
"USUARIO_NOME": "null",
"ID_USUARIO_UPCAMPO": "null",
"ID_USUARIO_REFERENCIA": "null"
}
]
}
]
Work order — returns GET
/ordem_agricola_devolucaoWhen the order is finalized, the quantity actually used may differ from the planned one. This route returns that difference, so the ERP can adjust its inventory: what was left over comes back in, what was missing goes out.
The parameters are the same as in the inputs route. So is the header.
Specific fields
| Field | Type | Notes |
|---|---|---|
| QUANTIDADE_DIFERENCA | Number | Quantity of the difference (original quantity − changed quantity). |
| TIPO_DIFERENCA | String | ENTRADA — it is a return: it must go into inventory.SAÍDA — it is an extra withdrawal: it must go out of inventory. |
| CODIGO_SAIDA_UPCAMPO | String | Order code plus the unique field × product sequence. |
| ID_SAIDA_UPCAMPO ID_SAIDA_REFERENCIA |
String | Identifier of the outflow in upCampo and in the third-party ERP. |
QUANTIDADE_DIFERENCA is always positive; the direction is given by TIPO_DIFERENCA. Posting everything as an entry doubles the balance.
[
{
"ID_FILIAL": "F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F",
"ID_ORDSER_UPCAMPO": "FDDB3C4F-7C62-4A6B-8B7A-4845244AB9AF",
"CODIGO": "00653",
"DATA_MODIFICACAO": "2023-12-19T17:24:40.910Z",
"DATPRESTRING": "19/12/2023",
"DATPRE": "2023-12-19T00:00:00.000Z",
"DATFINSTRING": "19/12/2023",
"DATFIN": "2023-12-19T00:00:00.000Z",
"ARETOT": 108,
"AREEXE": 108,
"STATUS": "Finalizado",
"TIPAPL": "Terrestre",
"USUARIO_NOME": "Admin",
"ID_USUARIO_UPCAMPO": "0dab044a-1e1e-4333-a39b-879e891fa086",
"ID_USUARIO_REFERENCIA": null,
"USUARIO_FINALIZOU_NOME": "Admin",
"ID_USUARIO_FINALIZOU_UPCAMPO": "0dab044a-1e1e-4333-a39b-879e891fa086",
"ID_USUARIO_FINALIZOU_REFERENCIA": null,
"TIPATI_DESCRICAO": "Aplicação de defensivo",
"ID_TIPATI_UPCAMPO": "FC35C6B4-6512-4F58-BEA2-CCAA6BFED487",
"ID_TIPATI_REFERENCIA": "3",
"IDERES_DESCRICAO": "INSETICIDA ",
"ID_IDERES_UPCAMPO": "7FE2669B-2820-45E8-83E2-40B74851A7D3",
"ID_IDERES_REFERENCIA": "55",
"EQUIPE_DESCRICAO": null,
"ID_EQUIPE_UPCAMPO": null,
"ID_EQUIPE_REFERENCIA": null,
"CODIGO_SAIDA_UPCAMPO": "00653_1",
"EXCLUIDO": false,
"ID_SAIDA_UPCAMPO": "A7306BB0-AACA-4FB6-8455-D6E5DE9902F1",
"ID_SAIDA_REFERENCIA": null,
"LOCEST_DESCRICAO": "FUM - DEFENSIVOS",
"ID_LOCEST_UPCAMPO": "E1E9D54F-535C-4715-83D3-D472A1E6ED5E",
"ID_LOCEST_REFERENCIA": "40",
"PRODUTO_DESCRICAO": "APRESA 1X20",
"ID_PRODUTO_UPCAMPO": "8DA739BC-28F3-4021-8A3A-311C92E06EC7",
"ID_PRODUTO_REFERENCIA": "9365",
"ID_LOTE_UPCAMPO": null,
"ID_LOTE_REFERENCIA": null,
"QUANTIDADE_DIFERENCA": 10,
"TIPO_DIFERENCA": "ENTRADA",
"TALHAO_DESCRICAO": "A01",
"SETOR": "CENTRO OESTE",
"ID_SETOR_REFERENCIA": "1",
"ID_TALHAO_UPCAMPO": "6CF450A4-00E7-47E0-BEE5-F83E713AEAEA",
"ID_TALHAO_REFERENCIA": "198",
"AREA": 108,
"VARIEDADE_DESCRICAO": "TMG 44 B2RF",
"ID_VARIEDADE_UPCAMPO": "D0FF4EA3-350D-440E-9264-4565CBCE0C57",
"ID_VARIEDADE_REFERENCIA": "26",
"CULTURA_DESCRICAO": "ALGODAO",
"ID_CULTURA_UPCAMPO": "E4B14FA0-807D-4A82-B9E3-A116BB72CA87",
"ID_CULTURA_REFERENCIA": "1",
"SAFRA_DESCRICAO": "Safra 01",
"ID_SAFRA_UPCAMPO": "E95AD81A-E30A-4AF4-99D1-F21FE86997FD",
"ID_SAFRA_REFERENCIA": "2",
"ID_PLANTIO_SAFRA_UPCAMPO": "551CBF6A-ADD7-4ACE-B9C8-C532FE3D2F71",
"ID_PLANTIO_SAFRA_REFERENCIA": null
}
]
Work order — executions GET
/ordem_agricola_execucaoOne line per execution: who operated, with which machine, on which field, how many hours. It is the order's labor and machine-hour record — the inputs route handles the product; this one, the work.
Accepts datmod_inicial, besides the same parameters as the other order routes.
Specific fields
| Field | Type | Notes |
|---|---|---|
| ID_EXECUCAO_UPCAMPO | String | Internal identifier of the execution in upCampo. |
| DATASTRING / DATA | String | Execution date in dd/mm/yyyy and in YYYY-MM-DD. |
| HORA_INICIO / MINUTO_INICIO HORA_FIM / MINUTO_FIM |
String | Start and end of the execution. |
| AREA | Number | Area in hectares of the execution. |
| EQUIPAMENTO_DESCRICAO ID_EQUIPAMENTO_UPCAMPO ID_EQUIPAMENTO_REFERENCIA |
String | Machine used. |
| IMPLEMENTO_DESCRICAO ID_IMPLEMENTO_UPCAMPO ID_IMPLEMENTO_REFERENCIA |
String | Attached implement. |
| LEIINI / LEIFIN | Number | Initial and final reading (hour meter or km). |
| QUAHOR | Number | Number of hours. |
| FUNCIONARIO_NOME ID_FUNCIONARIO_UPCAMPO ID_FUNCIONARIO_REFERENCIA |
String | Employee who carried it out. |
| ID_FUNCIONARIOS_AGRUPADOS | String | Identifiers of more than one employee in the same execution, separated by semicolons. |
The order header, the field, the variety, the crop, the season and the season planting come in the same fields described in the complete order.
curl -G https://api.upcampo.com.br/ordem_agricola_execucao \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'datmod_inicial=2023-06-01 09:00:00'
[
{
"ID_FILIAL": "DE319CA8-601F-4E68-978D-D0FB0DC27457",
"ID_ORDSER_UPCAMPO": "io0wrnIjESTkkvAGkrlY",
"CODIGO": "0570",
"DATPRESTRING": "24/05/2023",
"DATPRE": "2023-05-24",
"DATFINSTRING": "24/05/2023",
"DATFIN": "2023-05-24T00:00:00.000Z",
"ARETOT": 142,
"AREEXE": 142,
"STATUS": "Finalizado",
"ID_EXECUCAO_UPCAMPO": "0B94079D-8D3A-4FE2-B1F5-B0D36F3579BC",
"DATASTRING": "24/05/2023",
"DATA": "2023-05-24",
"HORA_INICIO": 7,
"MINUTO": 30,
"HORA_FIM": 8,
"MINUTO_FIM": 30,
"TALHAO_DESCRICAO": "16 - UNIAO",
"ID_TALHAO_UPCAMPO": "CA7742B0-AA38-4A37-A77C-10F214AED03D",
"ID_TALHAO_REFERENCIA": "1",
"VARIEDADE_DESCRICAO": "FM 985 GLTP",
"ID_VARIEDADE_UPCAMPO": "9D6D9741-AFEB-4405-BACD-4C7341EC8006",
"ID_VARIEDADE_REFERENCIA": "1",
"CULTURA_DESCRICAO": "ALGODAO",
"ID_CULTURA_UPCAMPO": "5795CCB1-44FC-44B8-AAB9-0DBDD4182E68",
"ID_CULTURA_REFERENCIA": "1",
"SAFRA_DESCRICAO": "ALGODAO E MILHO 2023",
"ID_SAFRA_REFERENCIA": "1",
"ID_PLANTIO_SAFRA_UPCAMPO": "592D56A2-2A71-4DD0-953B-F3020A142B5B",
"ID_PLANTIO_SAFRA_REFERENCIA": "1",
"TIPATI_DESCRICAO": "Aplicação de defensivo",
"ID_TIPATI_UPCAMPO": "8650A085-15E2-4877-A7DA-92A52D112463",
"ID_TIPATI_REFERENCIA": "1",
"IDERES": "FUNGICIDA + INSET",
"EQUIPAMENTO_DESCRICAO": "UNIPORTE AGRIJACTO - 0008",
"ID_EQUIPAMENTO_UPCAMPO": "ASD5889C-035E-478A-866C-B200B42300D9",
"ID_EQUIPAMENTO_REFERENCIA": "1",
"LEIINI": 10569,
"LEIFIN": 10570,
"QUAHOR": 1,
"EQUIPE_DESCRICAO": "UNIAO - APL TERRESTRE",
"ID_EQUIPE_UPCAMPO": "938C2A4C-035E-478A-866C-B200B42300D9",
"ID_EQUIPE_REFERENCIA": "1",
"FUNCIONARIO_NOME": "JOAO ALBERTO",
"ID_FUNCIONARIO_UPCAMPO": "938C2A4C-035E-8897A-866C-B200B42300D9",
"ID_FUNCIONARIO_REFERENCIA": "1",
"ID_FUNCIONARIOS_AGRUPADOS": "938C2A4C-035E-8897A-866C-B200B42300D9;938C2A4C-035E-8897A-866C-B200B42300D9;"
}
]
Fueling GET
/abastecimentoEach line is a fueling: how many liters went from which tank to which machine, with the hour meter or odometer reading. It is what supports the fleet's consumption control.
Parameters
| Option | Parameter | Notes |
|---|---|---|
| 1 | datmod_inicial | Initial modification date. Format YYYY-MM-DD HH:MM:SS — e.g. 2024-03-15 07:00:00. The time is optional; without it, it applies from midnight.Can be combined with: data_inicial + data_final — the document date, in YYYY-MM-DD;status (Finalizado or Pendente);id_locest (upCampo) or id_locest_referencia;id_equipamento (upCampo) or id_equipamento_referencia. |
| 2 | numero | Fueling number in upCampo. |
| 3 | id_referencia | Identifier in the partner's system. |
Example: ?datmod_inicial=2023-06-01 09:00:00&id_equipamento_referencia=23
Fields
| Field | Type | Notes |
|---|---|---|
| ID_ABASTECIMENTO_UPCAMPO | String | Identifier of the fueling in upCampo. |
| ID_REFERENCIA | String | Identifier in the partner's system, stored through the /abastecimentoReferencia route. |
| NUMERO | String | Number in upCampo. |
| TICKET | String | Additional number, for cases where there is a printed form with its own numbering. |
| DATASTRING | String | Date in dd/mm/yyyy format. |
| DATA | String | Date in YYYY-MM-DD format. |
| LITROS | Number | Liters fueled (quantity). |
| LEIINI | Number | Initial pump reading (counter). |
| LEIFIN | Number | Final pump reading (counter). |
| USUARIO_NOME ID_USUARIO_UPCAMPO ID_USUARIO_REFERENCIA |
String | Who created the record. |
| EQUIPAMENTO_DESCRICAO ID_EQUIPAMENTO_UPCAMPO ID_EQUIPAMENTO_REFERENCIA |
String | Machine fueled. |
| FUNCIONARIO_NOME ID_FUNCIONARIO_UPCAMPO ID_FUNCIONARIO_REFERENCIA |
String | Employee. |
| LOCEST_DESCRICAO ID_LOCEST_UPCAMPO ID_LOCEST_REFERENCIA |
String | Storage location the fuel came out of. |
| PRODUTO_DESCRICAO ID_PRODUTO_UPCAMPO ID_PRODUTO_REFERENCIA |
String | Fuel dispensed. |
curl -G https://api.upcampo.com.br/abastecimento \ -H 'Authorization: Bearer $TOKEN' \ --data-urlencode 'datmod_inicial=2023-06-01 09:00:00' \ --data-urlencode 'id_equipamento_referencia=23'
[
{
"ID_FILIAL": "F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F",
"ID_ORDSER_UPCAMPO": "3D73BCF4-97E4-48D8-A349-35672F46AB4B",
"NUMERO": "0001",
"TICKET": "Ticket 20",
"DATA_MODIFICACAO": "2023-10-26T14:00:22.793Z",
"DATASTRING": "26/10/2023",
"DATA": "2023-10-26T00:00:00.000Z",
"LITROS": 50,
"LEIINI": 0,
"LEIFIN": 50,
"USUARIO_NOME": "Admin",
"ID_USUARIO_UPCAMPO": "0dab044a-1e1e-4333-a39b-879e891fa086",
"ID_USUARIO_REFERENCIA": null,
"EQUIPAMENTO_DESCRICAO": "0046 - 0046 - HERCULES 6.0 STARA - 0044",
"ID_EQUIPAMENTO_UPCAMPO": "02CB7041-64DC-4E3F-99AB-C3ACC1E20016",
"ID_EQUIPAMENTO_REFERENCIA": "54",
"HORIMETRO": 4506,
"FUNCIONARIO_NOME": null,
"ID_FUNCIONARIO_UPCAMPO": null,
"ID_FUNCIONARIO_REFERENCIA": null,
"LOCEST_DESCRICAO": "FUM - DIESEL",
"ID_LOCEST_UPCAMPO": "23C7A375-B67B-42BC-ABD9-6577F075A26A",
"ID_LOCEST_REFERENCIA": "38",
"PRODUTO_DESCRICAO": "DIESEL S10",
"ID_PRODUTO_UPCAMPO": "F44E08B3-4A0F-4A35-99AD-1E66418611D9",
"ID_PRODUTO_REFERENCIA": ""
}
]
Bales GET
/fardo?data_inicial=…&data_final=…
Each cotton bale (module) harvested in the field becomes a line here, with the QR Code, the harvester's module id, the farm weight and the field of origin. It is what links the harvest to the cotton gin.
When using this route for receiving at the cotton gin, the condition is to update the weight through the /fardoPeso route. If use for a cotton gin is identified without the weight being returned, access will be blocked.
Filters
| Parameter | Filtered field | Notes |
|---|---|---|
| data_inicial data_final |
DATA | Required. Format YYYY-MM-DD — e.g. 2024-08-19. |
| id_talhao_upcampo | ID_TALHAO_UPCAMPO | Identifier of the field in upCampo. |
| id_talhao_referencia | ID_TALHAO_REFERENCIA | Identifier of the field in the customer's system. |
| id_plantio_safra_referencia | ID_PLANTIO_SAFRA_REFERENCIA | Identifier of the season planting in the customer's system. |
| talhao_descricao | TALHAO_DESCRICAO | Exact match. |
| setor | SETOR | Exact match. |
| talhao_descricao_setor | TALHAO_DESCRICAO_SETOR | Description and sector concatenated; exact match. |
| talhao_finalizado | TALHAO_FINALIZADO | Accepts true/false or 1/0. |
- The comparison is exact, with no partial search: the value must be identical to the one returned by the route.
- Values with spaces or accents must be URL-encoded (space =
%20). - An invalid value in
talhao_finalizadois ignored, and the query returns without that filter. - To find the identifiers and the exact description of the field, use the
/talhaoroute, which accepts thesetorparameter.
Fields
| Field | Type | Notes |
|---|---|---|
| ID_FARDO_UPCAMPO | String | Identifier in upCampo. |
| CODIGO | String | Code or number in upCampo. |
| DATASTRING / DATA | String | dd/mm/yyyy and YYYY-MM-DD. |
| HORA / MINUTO | Number | |
| QRCODE | String | QR Code of the bale. |
| MODULEID | String | Unique number the harvester writes on the bale. |
| STATUS | String | No campo or Recolhido. |
| PESFAZ | Number | Weight at the farm — the machine's, in kg. |
| PESALG | Number | Cotton gin weight, after pickup. |
| HECTARE | Number | Hectares that produced this bale. |
| LATITUDE / LONGITUDE | String | Where the bale was produced. |
| OBSERVACAO | String | Additional notes on the bale. |
| ID_REFERENCIA | String | Identifier in the partner's system. |
| TALHAO_DESCRICAO TALHAO_DESCRICAO_SETOR ID_TALHAO_UPCAMPO ID_TALHAO_REFERENCIA |
String | Field of origin. TALHAO_DESCRICAO_SETOR is description + sector. |
| SETOR | String | In most cases, it is the name of the farm within the group. |
| ID_SETOR_REFERENCIA | String | Identifier in the third-party ERP. Tip: if the ERP uses several branches and upCampo does not, do the mapping here. |
| VARIEDADE_DESCRICAO ID_VARIEDADE_UPCAMPO ID_VARIEDADE_REFERENCIA |
String | Variety harvested. |
| CULTURA_DESCRICAO ID_CULTURA_UPCAMPO ID_CULTURA_REFERENCIA |
String | Crop. |
| SAFRA_DESCRICAO ID_SAFRA_UPCAMPO ID_SAFRA_REFERENCIA |
String | Season. |
| ID_PLANTIO_SAFRA_UPCAMPO ID_PLANTIO_SAFRA_REFERENCIA |
String | Corresponding season planting. |
| TALHAO_FINALIZADO | Boolean | Whether the field has already been finalized. |
| EQUIPAMENTO_DESCRICAO ID_EQUIPAMENTO_UPCAMPO ID_EQUIPAMENTO_REFERENCIA |
String | Harvester. |
/fardo?data_inicial=2024-08-19&data_final=2024-08-25&talhao_descricao=07&setor=CAMPINAS /fardo?data_inicial=2024-08-19&data_final=2024-08-25&talhao_descricao_setor=07%20-%20CAMPINAS /fardo?data_inicial=2024-08-19&data_final=2024-08-25&id_talhao_referencia=ABC123 /fardo?data_inicial=2024-08-19&data_final=2024-08-25&id_plantio_safra_referencia=XYZ789 /fardo?data_inicial=2024-08-19&data_final=2024-08-25&talhao_descricao_setor=07%20-%20CAMPINAS&talhao_finalizado=false
[
{
"ID_FILIAL": "F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F",
"ID_FARDO_UPCAMPO": "D83E100A-DFDB-451A-B4BB-56ED09EA851C",
"CODIGO": "1",
"DATA": "2023-06-20",
"DATASTRING": "20/06/2023",
"HORA": 15,
"MINUTO": 16,
"QRCODE": "1234",
"MODULEID": "456",
"STATUS": "No campo",
"PESFAZ": 800,
"PESALG": null,
"HECTARE": 0.5,
"LATITUDE": 0,
"LONGITUDE": 0,
"OBSERVACAO": null,
"ID_REFERENCIA": null,
"TALHAO_DESCRICAO": "TH Teste 01",
"TALHAO_SETOR": null,
"ID_TALHAO_UPCAMPO": "7AB7EDAF-6560-4ABF-834D-7D53D2C4C8F2",
"ID_TALHAO_REFERENCIA": "2",
"VARIEDADE_DESCRICAO": null,
"ID_VARIEDADE_UPCAMPO": null,
"ID_VARIEDADE_REFERENCIA": null,
"CULTURA_DESCRICAO": "Soja",
"ID_CULTURA_UPCAMPO": "EC8A50F5-0B77-45FC-9242-70002C8D10E5",
"ID_CULTURA_REFERENCIA": "1",
"SAFRA_DESCRICAO": "Safra 01",
"ID_SAFRA_REFERENCIA": "6",
"ID_PLANTIO_SAFRA_UPCAMPO": "EBA7428C-9ECA-415D-9335-6B3B40AEF482",
"ID_PLANTIO_SAFRA_REFERENCIA": null,
"EQUIPAMENTO_DESCRICAO": null,
"ID_EQUIPAMENTO_UPCAMPO": null,
"ID_EQUIPAMENTO_REFERENCIA": null,
"createdat": "2023-06-20T19:16:32.001Z"
}
]
Add bale POST
/fardoTo add a bale with the full record. To update only the reference or only the weight, use the specific routes: /fardoReferencia and /fardoPeso.
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| DATA | String | Yes | Format YYYY-MM-DD — e.g. 2024-08-19. |
| QRCODE | String | — | QR Code of the bale. |
| MODULEID | String | — | Unique number the harvester writes on the bale. |
| STATUS | String | Yes | No campo or Recolhido. |
| PESFAZ | Number | — | Weight at the farm — the machine's, in kg. |
| PESALG | Number | — | Cotton gin weight, after pickup. |
| HECTARE | Number | — | Hectares that produced this bale. |
| LATITUDE / LONGITUDE | String | — | Where the bale was produced. |
| OBSERVACAO | String | — | Additional notes on the bale. |
| ID_REFERENCIA | String | Yes | Identifier in the partner's system. |
| CONTEC | Boolean | Yes | Checked by the technician. |
| ID_PLANTIO_SAFRA_REFERENCIA | String | Yes | Identifier in the third-party ERP. Either this field or the combination ID_TALHAO_REFERENCIA + ID_VARIEDADE_REFERENCIA + ID_CULTURA_REFERENCIA + ID_SAFRA_REFERENCIA is required. |
| ID_TALHAO_REFERENCIA | String | — | Identifier in the third-party ERP, mapped in upCampo. |
| ID_VARIEDADE_REFERENCIA | String | — | Identifier in the third-party ERP, mapped in upCampo. |
| ID_CULTURA_REFERENCIA | String | — | Identifier in the third-party ERP, mapped in upCampo. |
| ID_SAFRA_REFERENCIA | String | — | Identifier in the third-party ERP, mapped in upCampo. |
| ID_EQUIPAMENTO_REFERENCIA | String | — | Identifier in the third-party ERP, mapped in upCampo. |
[
{
"ID_PLANTIO_SAFRA_REFERENCIA": "12",
"MODULEID": "MODULEID",
"QRCODE": "QRCODE",
"ID_REFERENCIA": "111",
"LATITUDE": "1",
"LONGITUDE": "2",
"PESFAZ": 1100,
"PESALG": 1500.6,
"HECTARES": 0.5,
"STATUS": "No campo",
"DATA": "2023-7-03",
"ID_EQUIPAMENTO_REFERENCIA": "1"
}
]
Bale weight POST
/fardoPesoThis is the route that closes the cotton cycle: the cotton gin weighs the bale it picked up and sends PESALG back to upCampo. Without it, the field only has the harvester's estimated weight.
Anyone who consumes /fardo, /fardoEspecifico or /romcol for receiving at the cotton gin must update the weight here. If use is identified without the weight being returned, access will be blocked.
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| ID_FARDO_UPCAMPO | String | Yes | Identifier of the bale in upCampo. |
| ID_REFERENCIA | String | No | Identifier in the partner's system. |
| PESALG | Number | Yes | Cotton gin weight, after pickup. |
| STATUS | String | Yes | No campo or Recolhido. |
| DATA | String | Yes | Format YYYY-MM-DD — e.g. 2024-08-19. |
| ID_EQUIPAMENTO_REFERENCIA | String | No | Identifier in the third-party ERP, mapped in upCampo. |
| ID_LOCEST_REFERENCIA | String | No | Identifier in the third-party ERP, mapped in upCampo. |
| NUMCOL | String | No | Pickup number in the third-party ERP. |
The body is an array — it can carry more than one bale per call.
[
{
"ID_FARDO_UPCAMPO": "D83E100A-DFDB-451A-B4BB-56ED09EA851C",
"ID_REFERENCIA": "1",
"PESALG": 1500.6,
"STATUS": "Recolhido",
"DATA": "2023-6-21",
"ID_EQUIPAMENTO_REFERENCIA": "1",
"PLACA": "JHW-5047",
"ID_LOCEST_REFERENCIA": "1010101",
"NUMCOL": "0059"
}
]
[
{
"TABELA": "FARDO",
"ID_UPCAMPO": "D83E100A-DFDB-451A-B4BB-56ED09EA851C",
"ID_REFERENCIA": "1",
"STATUS": "ALTERADO",
"MENSAGEM": ""
}
]
Specific bale GET
/fardoEspecifico?qrcode=… | moduleid=… | codigo=… | id=…
Looks up a bale by the identification read at the cotton gin gate. It is the route used when the truck arrives and someone scans the QR Code.
The filter is one of these: qrcode, moduleid, codigo or id. If you fill in more than one, the last one in this list applies; if you fill in none, nothing is returned.
The condition is to update the weight through /fardoPeso. Without it, access will be blocked.
The fields returned are the same as in the Bales route.
curl 'https://api.upcampo.com.br/fardoEspecifico?qrcode=1234' \ -H 'Authorization: Bearer $TOKEN'
[
{
"ID_FILIAL": "F8E34B7E-2054-4A97-9EE4-9D8BFC8C917F",
"ID_FARDO_UPCAMPO": "D83E100A-DFDB-451A-B4BB-56ED09EA851C",
"CODIGO": "1",
"DATA": "2023-06-20",
"DATASTRING": "20/06/2023",
"HORA": 15,
"MINUTO": 16,
"QRCODE": "1234",
"MODULEID": "456",
"STATUS": "No campo",
"PESFAZ": 800,
"PESALG": null,
"HECTARE": 0.5,
"LATITUDE": 0,
"LONGITUDE": 0,
"OBSERVACAO": null,
"ID_REFERENCIA": null,
"TALHAO_DESCRICAO": "TH Teste 01",
"TALHAO_SETOR": null,
"ID_TALHAO_UPCAMPO": "7AB7EDAF-6560-4ABF-834D-7D53D2C4C8F2",
"ID_TALHAO_REFERENCIA": "2",
"CULTURA_DESCRICAO": "Soja",
"ID_CULTURA_UPCAMPO": "EC8A50F5-0B77-45FC-9242-70002C8D10E5",
"ID_CULTURA_REFERENCIA": "1",
"SAFRA_DESCRICAO": "Safra 01",
"ID_SAFRA_REFERENCIA": "6",
"ID_PLANTIO_SAFRA_UPCAMPO": "EBA7428C-9ECA-415D-9335-6B3B40AEF482",
"ID_PLANTIO_SAFRA_REFERENCIA": null,
"createdat": "2023-06-20T19:16:32.001Z"
}
]
Harvest load ticket GET
/romcol?data_inicial=…&data_final=…
The harvest load ticket is the document that records the weighing and grading of each load arriving from the field. It carries the three scale weights — gross, tare and net —, the grading percentages and the final net total, which is the balance that goes into inventory and makes up the field's yield.
When using this route for receiving at the cotton gin, the condition is to update the weight through the /fardoPeso route. If use is identified without the weight being returned, access will be blocked.
Weights and grading
| Field | Type | Notes |
|---|---|---|
| PESBRU | Number | Gross weight — first weighing, loaded truck, in kg. Required. |
| PESTAR | Number | Tare weight — second weighing, empty truck, in kg. Required. |
| PESLIQ | Number | Initial net weight, before grading. Required. |
| Discounts — the same trio for each type | ||
| UMIPER / UMIDES / UMIDESKG | Number | Moisture: measured percentage, discount percentage applied (grading table) and discount in kg already applied to PESLIQ. |
| IMPPER / IMPDES / IMPDESKG | Number | Foreign matter. |
| AVAPER / AVADES / AVADESKG | Number | Damaged. |
| QUEPER / QUEDES / QUEDESKG | Number | Broken. |
| ARDPER / ARDDES / ARDDESKG | Number | Heat-damaged. |
| ARMPER / ARMDES / ARMDESKG | Number | Storage. |
| TOTDES | Number | Total discount, in kg. |
| TOTLIQ | Number | Final net total — the net after grading, with discounts already applied. Required. |
Moisture, foreign matter, damaged, heat-damaged and broken are measured by the farm's grader, at the scale itself. Each farm enables only the types it uses — a type that is not enabled does not appear on the load ticket. The discount percentages come from the tables configured in the season, not from the load ticket.
Other fields
| Field | Type | Notes |
|---|---|---|
| ID_ROMCOL_UPCAMPO | String | Identifier in upCampo. |
| NUMERO | String | Code or number in upCampo. Required. |
| NUMAUT | String | Authorization number (optional). |
| DATASTRING / DATA | String | dd/mm/yyyy and YYYY-MM-DD. |
| HORA / MINUTO | Number | |
| OBSERVACAO | String | Additional notes. |
| CULTURA_DESCRICAO ID_CULTURA_UPCAMPO ID_CULTURA_REFERENCIA |
String | Crop harvested. |
| SAFRA_DESCRICAO ID_SAFRA_UPCAMPO ID_SAFRA_REFERENCIA |
String | Season. |
| ID_PLANTIO_SAFRA_UPCAMPO ID_PLANTIO_SAFRA_REFERENCIA |
String | Season planting the load came from. |
| EQUIPAMENTO_DESCRICAO ID_EQUIPAMENTO_UPCAMPO ID_EQUIPAMENTO_REFERENCIA |
String | Truck. |
| PLACA | String | Truck license plate. |
| MOTORISTA | String | Truck driver. |
| LOCEST_DESCRICAO ID_LOCEST_UPCAMPO ID_LOCEST_REFERENCIA |
String | Destination storage location (warehouse). |
| PRODUTO_DESCRICAO ID_PRODUTO_UPCAMPO ID_PRODUTO_REFERENCIA |
String | Product that goes into inventory — for example SOJA EM GRÃOS. |
curl 'https://api.upcampo.com.br/romcol?data_inicial=2023-12-11&data_final=2023-12-17' \ -H 'Authorization: Bearer $TOKEN'
[
{
"ID_FILIAL": "F23FBAF7-AB27-4D28-8B32-74240FB0833D",
"ID_ROMCOL_UPCAMPO": "9ryejRKRhClBLcKTXwvx",
"NUMERO": "4819",
"DATA": "2023-12-12",
"DATASTRING": "12/12/2023",
"HORA": 8,
"MINUTO": 42,
"NUMAUT": "701",
"PESBRU": 85700,
"PESTAR": 27560,
"PESLIQ": 58140,
"UMIPER": 13.2,
"UMIDES": 0,
"UMIDESKG": 0,
"IMPPER": 1.6,
"IMPDES": 0,
"IMPDESKG": 349,
"AVAPER": 2,
"AVADES": 0,
"AVADESKG": 0,
"QUEPER": 10,
"QUEDES": 0,
"QUEDESKG": 1163,
"ARDPER": null,
"ARDDES": null,
"ARDDESKG": null,
"ARMPER": null,
"ARMDES": null,
"ARMDESKG": null,
"TOTDES": 1512,
"TOTLIQ": 56628,
"OBSERVACAO": null,
"ID_REFERENCIA": null,
"TALHAO_DESCRICAO": "22",
"SETOR": "SANTA CLARA",
"ID_SETOR_REFERENCIA": "8",
"ID_TALHAO_UPCAMPO": "6B93B381-5D0A-4552-903C-AF1D2051D248",
"ID_TALHAO_REFERENCIA": "74",
"VARIEDADE_DESCRICAO": "TMG 2379 IPRO",
"ID_VARIEDADE_UPCAMPO": "23537C7D-5720-4D2E-84D7-84FFA488703D",
"ID_VARIEDADE_REFERENCIA": null,
"CULTURA_DESCRICAO": "SOJA",
"ID_CULTURA_UPCAMPO": "4A47936F-60EC-4724-BAC8-16ABD48C9C92",
"ID_CULTURA_REFERENCIA": null,
"SAFRA_DESCRICAO": "SOJA E BRAQUIARIA 2023-2024",
"ID_SAFRA_REFERENCIA": null,
"ID_PLANTIO_SAFRA_UPCAMPO": "07DF860F-83BF-4069-9598-A11FC3E4DD6B",
"ID_PLANTIO_SAFRA_REFERENCIA": null,
"EQUIPAMENTO_DESCRICAO": "ABC-1D23 - CAMINHAO SCANIA R540 - 0091",
"ID_EQUIPAMENTO_UPCAMPO": "4E0B4070-50C2-4592-AC7B-ADA806842311",
"ID_EQUIPAMENTO_REFERENCIA": null,
"PLACA": null,
"MOTORISTA": "JOSE CARLOS PEREIRA",
"LOCEST_DESCRICAO": "ARMAZEM CENTRAL LTDA",
"ID_LOCEST_UPCAMPO": "460E0265-66BB-4892-A1C1-9E392B1DE9A0",
"ID_LOCEST_REFERENCIA": null,
"PRODUTO_DESCRICAO": "SOJA EM GRÃOS",
"ID_PRODUTO_UPCAMPO": "2E0F8AAA-E005-4410-9C37-7492866448CB",
"ID_PRODUTO_REFERENCIA": null,
"createdat": "2023-12-12T12:55:15.532Z"
}
]
Add harvest load ticket POST
/romcolTo add the harvest load ticket with the full record. To update only the grading, use /romcolClassificacao.
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| ID_REFERENCIA | String | Yes | Identifier in the partner's system. |
| NUMERO | String | Yes | Code or number in upCampo. |
| NUMAUT | String | — | Authorization number. |
| DATA | String | — | Format YYYY-MM-DD — e.g. 2024-08-19. |
| HORA / MINUTO | Number | — | |
| PESBRU | Number | Yes | Gross weight — first weighing, loaded truck, in kg. |
| PESTAR | Number | Yes | Tare weight — second weighing, empty truck, in kg. |
| PESLIQ | Number | Yes | Initial net weight, before grading. |
| OBSERVACAO | String | — | Additional notes. |
| ID_PLANTIO_SAFRA_REFERENCIA | String | Yes | Identifier in the third-party ERP. Either this field or the combination ID_TALHAO_REFERENCIA + ID_VARIEDADE_REFERENCIA + ID_CULTURA_REFERENCIA + ID_SAFRA_REFERENCIA is required. |
| ID_TALHAO_REFERENCIA ID_VARIEDADE_REFERENCIA ID_CULTURA_REFERENCIA ID_SAFRA_REFERENCIA |
String | — | Identifiers in the third-party ERP, mapped in upCampo. Use them when there is no season planting. |
| ID_EQUIPAMENTO_REFERENCIA | String | If there is no license plate | Identifier of the truck in the third-party ERP, mapped in upCampo. |
| PLACA | String | If there is no equipment | Truck license plate. |
| MOTORISTA | String | — | |
| ID_LOCEST_REFERENCIA | String | Yes | Identifier in the third-party ERP of the storage location (warehouse). |
| ID_PRODUTO_REFERENCIA | String | Yes | Identifier in the third-party ERP of the product going into inventory (soybean, corn). |
| UMIPER … ARMDESKG | Number | — | Grading percentages and discounts — the same fields described in Harvest load ticket. |
| TOTLIQ | Number | At the end | Final net total. Required at the end of the operation: every load ticket must have grading and some value in TOTLIQ — this final balance is what goes into inventory and into the yield averages. |
[
{
"ID_REFERENCIA": "1",
"NUMERO": "4826",
"DATA": "2023-12-13",
"HORA": 8,
"MINUTO": 42,
"PESBRU": 85700,
"PESTAR": 27560,
"PESLIQ": 58140,
"UMIPER": 13.2,
"UMIDES": 0,
"UMIDESKG": 0,
"IMPPER": 1.6,
"IMPDES": 0,
"IMPDESKG": 349,
"AVAPER": 2,
"AVADES": 0,
"AVADESKG": 0,
"QUEPER": 10,
"QUEDES": 0,
"QUEDESKG": 1163,
"ARDPER": null,
"ARDDES": null,
"ARDDESKG": null,
"ARMPER": null,
"ARMDES": null,
"ARMDESKG": null,
"TOTDES": 1512,
"TOTLIQ": 56628,
"OBSERVACAO": null,
"SETOR": "SANTA CLARA",
"ID_SETOR_REFERENCIA": "8",
"ID_TALHAO_REFERENCIA": "74",
"ID_VARIEDADE_REFERENCIA": "1",
"ID_CULTURA_REFERENCIA": "1",
"ID_SAFRA_REFERENCIA": "1",
"ID_PLANTIO_SAFRA_REFERENCIA": "1",
"ID_EQUIPAMENTO_REFERENCIA": "1",
"ID_LOCEST_REFERENCIA": "1",
"ID_PRODUTO_REFERENCIA": "1",
"PLACA": null,
"MOTORISTA": "JOSE CARLOS PEREIRA"
}
]
[
{
"TABELA": "ROMCOL",
"ID_UPCAMPO": "9ryejRKRhClBLcKTXwvx",
"ID_REFERENCIA": "1",
"STATUS": "INCLUIDO",
"MENSAGEM": ""
}
]
Load ticket grading POST
/romcolClassificacaoTo add or update only the grading of an existing load ticket — the typical case when the load is weighed first and graded later.
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| ID_REFERENCIA | String | Yes | Identifier in the partner's system. |
| ID_ROMCOL_UPCAMPO | String | — | Identifier of the load ticket in upCampo. |
| UMIPER / UMIDES / UMIDESKG | Number | — | Moisture: measured percentage, discount percentage and discount in kg. |
| IMPPER / IMPDES / IMPDESKG | Number | — | Foreign matter. |
| AVAPER / AVADES / AVADESKG | Number | — | Damaged. |
| QUEPER / QUEDES / QUEDESKG | Number | — | Broken. |
| ARDPER / ARDDES / ARDDESKG | Number | — | Heat-damaged. |
| ARMPER / ARMDES / ARMDESKG | Number | — | Storage. |
| TOTDES / TOTLIQ | Number | — | Total discount and final net total. |
[
{
"ID_REFERENCIA": "1",
"ID_ROMCOL_UPCAMPO": "9ryejRKRhClBLcKTXwvx",
"NUMERO": "4826",
"DATA": "2023-12-13",
"HORA": 8,
"MINUTO": 42,
"UMIPER": 13.2,
"UMIDES": 0,
"UMIDESKG": 0,
"IMPPER": 1.6,
"IMPDES": 0,
"IMPDESKG": 349,
"AVAPER": 2,
"AVADES": 0,
"AVADESKG": 0,
"QUEPER": 10,
"QUEDES": 0,
"QUEDESKG": 1163,
"ARDPER": null,
"ARDDES": null,
"ARDDESKG": null,
"ARMPER": null,
"ARMDES": null,
"ARMDESKG": null,
"TOTDES": 1512,
"TOTLIQ": 56628
}
]
[
{
"TABELA": "ROMCOL",
"ID_UPCAMPO": "9ryejRKRhClBLcKTXwvx",
"ID_REFERENCIA": "1",
"STATUS": "ALTERADO",
"MENSAGEM": ""
}
]
❓ Frequently asked questions
How do I authenticate with the upCampo API?
Send a POST to https://api.upcampo.com.br/autenticar with a JSON containing client_id, client_secret, audience and grant_type. upCampo delivers this credentials file ready to use to the partner. The response contains a bearer token valid for 24 hours, which must go in the Authorization header of every subsequent call.
Do I need to generate a new token for every call?
No. Use the same token until it expires. Generating a token per request overloads token generation and access is temporarily blocked. The current validity is 24 hours, stored inside the token itself (in the JWT exp field) — the response body contains only access_token and token_type.
And the limit is actually enforced: there is a maximum of 10 authentication attempts every 15 minutes per client_id; beyond that, the API responds 429 with the Retry-After header indicating in how many seconds access is restored.
How does the API know which company and which farm the data belongs to?
The company and farm identifiers are fixed internally in the API when the Client ID and Client Secret are issued. Each endpoint returns only data from that company and that farm — there is no parameter to change this in the call. That is why each farm requires its own pair of credentials.
What is the ID_REFERENCIA field for?
It is the column that stores the record's identifier in the partner's system, present in every upCampo table. When it receives a POST, upCampo looks for a record with that ID_REFERENCIA: if it does not find one, it is an insert; if it does, it is an update. And every GET returns this field, which lets the ERP recognize its own records.
How do I send a deletion through the API?
Send the record with the DELETADO attribute equal to true. There is no DELETE verb: deletion is logical and goes in the same POST as the record.
How do I pull only what changed since the last query?
Use the datmod_inicial parameter with the date and time of the previous query. Every time a user creates or changes a record in upCampo, the modification date is updated. Save the date of each query and use it in the next query to receive only the records changed after it.
Why does the period query only accept seven days?
On transaction routes — movements, transfers and work orders — the window between data_inicial and data_final is at most seven days, to keep response times down. For a historical load, make several calls in consecutive windows. The rain routes and the scouting (IPM) routes are the exception: their window is 366 days, because they are queried by season.
What does each STATUS in a POST response mean?
INCLUIDO means the record was new and was created; ALTERADO, that it already existed and was updated; ERRO, that it was blocked — and then the reason comes in the MENSAGEM field. In documents with a header and items, a single line with ERRO is enough for the whole document not to be saved.
Which endpoint returns the harvested cotton bales?
GET /fardo, with data_inicial and data_final required, returns the bales with QR Code, module id, farm weight, hectares and field of origin. To look up a specific bale at the cotton gin gate, use GET /fardoEspecifico with qrcode, moduleid, codigo or id. Anyone using these routes for receiving at the cotton gin must send the weight back through POST /fardoPeso.
Is there a machine-readable specification of the API?
Yes. The OpenAPI 3.1 specification is at suporte.upcampo.com.br/api/openapi.json and covers every documented endpoint, parameter, body and response. It can be imported into Postman, Insomnia, Swagger UI or client generators.
Closing
We believe integration is essential for our audience — our customers — to get the most out of any technology; after all, they own the data and are the reason for all our work.
That is why we are always available to review and make changes to the integration that benefit our customers and partners. For questions, contact the upCampo team.
Best regards from the upCampo team.