- Introdução
- Ambiente
- Autenticação
- Pré-Autorização
- Webhooks
Criar uma Pré-Autorização
POST
/api/v1/oneos/prospects/pre-authorizations
PRE-AUTHORIZATION
Request
Header Params
Authorization
string
required
Example:
{{ACCESS_TOKEN}}
Body Params application/json
projectIdentifier
string
required
uniqueId
string
required
clientTaxId
string
required
contractedTaxId
string
required
contractedEmail
string
required
contractedReceiptNumber
string
optional
constructorInvoice
object
required
originalAmount
number <float>
required
Examples:
1000.052000.6520000.5
withHoldTaxAmount
number <float>
optional
Examples:
1000100.051250.55
dueDate
string
required
number
string
required
description
string
optional
contractedReceipt
object
optional
contentBase64
string
optional
Example
{
"projectIdentifier": "Projeto Maracanã",
"uniqueId": "PRJ-01",
"clientTaxId": "string",
"contractedTaxId": "99999999999999",
"contractedEmail": "test@test.com",
"contractedReceiptNumber": "0001",
"constructorInvoice": {
"originalAmount": 10000,
"withHoldTaxAmount": 1000,
"discountedAmount": 9000,
"dueDate": "2022-10-05",
"number": "0001",
"description": "Compra de cimento"
},
"contractedReceipt": {
"contentBase64": "string"
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://one.app-hm.oneos.com.br/api/v1/oneos/prospects/pre-authorizations' \
--header 'Authorization: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"projectIdentifier": "Projeto Maracanã",
"uniqueId": "PRJ-01",
"clientTaxId": "string",
"contractedTaxId": "99999999999999",
"contractedEmail": "test@test.com",
"contractedReceiptNumber": "0001",
"constructorInvoice": {
"originalAmount": 10000,
"withHoldTaxAmount": 1000,
"discountedAmount": 9000,
"dueDate": "2022-10-05",
"number": "0001",
"description": "Compra de cimento"
},
"contractedReceipt": {
"contentBase64": "string"
}
}'
Responses
🟢200OK
application/json
Body
id
integer
required
projectIdentifier
string
required
contractedName
string
required
contractedTaxId
string
required
clientName
string
required
clientPersonType
string
required
clientTaxId
string
required
constructorName
string
required
constructorTaxId
string
required
prospectAnticipationId
integer
optional
expirationDate
string
required
uniqueId
string
optional
status
string
required
revocationReasons
string
optional
constructorInvoice
object
required
originalAmount
number <float>
required
Examples:
1000010000.512500.55
withHoldTaxAmount
number <float>
optional
Examples:
10001000.5125.3222347.65
discountedAmount
string
required
dueDate
string
required
number
string
required
description
string
optional
contractedReceiptNumber
string
optional
origin
string
required
Example
{
"id": 1,
"projectIdentifier": "Projeto Maracanã",
"constructorName": "One Construction",
"clientTaxId": "99999999999999",
"prospectAnticipationId": 1,
"expirationDate": "2022-10-05",
"uniqueId": "Projeto Maracanã",
"status": "WAITING_CONTRACTED",
"revocationReason": "string",
"constructorInvoice": {
"originalAmount": 1000,
"withHoldTaxAmount": 100,
"dueDate": "2022-10-05",
"number": "0001",
"description": "Compra de cimento"
},
"contractedReceiptNumber": "string"
}

Modified at 2024-07-19 19:04:21