curl --request POST \
--url https://sandbox.api.veepag.com/v1/product \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"companyId": "<string>",
"active": true,
"deleted": true,
"setting": {
"re1to1": true,
"successChargeDay": true,
"cardAuth": true
},
"checkout": {
"tracking": {
"meta": "<string>",
"gtm": "<string>"
}
},
"discount": {
"list": []
},
"notification": {}
}
'import requests
url = "https://sandbox.api.veepag.com/v1/product"
payload = {
"companyId": "<string>",
"active": True,
"deleted": True,
"setting": {
"re1to1": True,
"successChargeDay": True,
"cardAuth": True
},
"checkout": { "tracking": {
"meta": "<string>",
"gtm": "<string>"
} },
"discount": { "list": [] },
"notification": {}
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
companyId: '<string>',
active: true,
deleted: true,
setting: {re1to1: true, successChargeDay: true, cardAuth: true},
checkout: {tracking: {meta: '<string>', gtm: '<string>'}},
discount: {list: []},
notification: {}
})
};
fetch('https://sandbox.api.veepag.com/v1/product', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.api.veepag.com/v1/product",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'companyId' => '<string>',
'active' => true,
'deleted' => true,
'setting' => [
're1to1' => true,
'successChargeDay' => true,
'cardAuth' => true
],
'checkout' => [
'tracking' => [
'meta' => '<string>',
'gtm' => '<string>'
]
],
'discount' => [
'list' => [
]
],
'notification' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.veepag.com/v1/product"
payload := strings.NewReader("{\n \"companyId\": \"<string>\",\n \"active\": true,\n \"deleted\": true,\n \"setting\": {\n \"re1to1\": true,\n \"successChargeDay\": true,\n \"cardAuth\": true\n },\n \"checkout\": {\n \"tracking\": {\n \"meta\": \"<string>\",\n \"gtm\": \"<string>\"\n }\n },\n \"discount\": {\n \"list\": []\n },\n \"notification\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.veepag.com/v1/product")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyId\": \"<string>\",\n \"active\": true,\n \"deleted\": true,\n \"setting\": {\n \"re1to1\": true,\n \"successChargeDay\": true,\n \"cardAuth\": true\n },\n \"checkout\": {\n \"tracking\": {\n \"meta\": \"<string>\",\n \"gtm\": \"<string>\"\n }\n },\n \"discount\": {\n \"list\": []\n },\n \"notification\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.veepag.com/v1/product")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyId\": \"<string>\",\n \"active\": true,\n \"deleted\": true,\n \"setting\": {\n \"re1to1\": true,\n \"successChargeDay\": true,\n \"cardAuth\": true\n },\n \"checkout\": {\n \"tracking\": {\n \"meta\": \"<string>\",\n \"gtm\": \"<string>\"\n }\n },\n \"discount\": {\n \"list\": []\n },\n \"notification\": {}\n}"
response = http.request(request)
puts response.read_body{
"_id": "product_id",
"companyId": "company_id",
"active": true,
"deleted": false
}{
"error_messages": [
{
"msg": "Payload invalido.",
"type": "field",
"path": "companyId",
"location": "body"
}
],
"code": "ZodValidationException",
"path": "/v1/product",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unauthorized."
}
],
"code": "unauthorized",
"path": "/v1/product",
"metadata": {}
}{
"error_messages": [
{
"msg": "Forbidden."
}
],
"code": "forbidden",
"path": "/v1/product",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unknown server error."
}
],
"code": "unknown_server_error",
"path": "/v1/product",
"metadata": {}
}Create a product
Cria um produto com configuracoes de preco, cobranca, checkout e notificacoes.
curl --request POST \
--url https://sandbox.api.veepag.com/v1/product \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"companyId": "<string>",
"active": true,
"deleted": true,
"setting": {
"re1to1": true,
"successChargeDay": true,
"cardAuth": true
},
"checkout": {
"tracking": {
"meta": "<string>",
"gtm": "<string>"
}
},
"discount": {
"list": []
},
"notification": {}
}
'import requests
url = "https://sandbox.api.veepag.com/v1/product"
payload = {
"companyId": "<string>",
"active": True,
"deleted": True,
"setting": {
"re1to1": True,
"successChargeDay": True,
"cardAuth": True
},
"checkout": { "tracking": {
"meta": "<string>",
"gtm": "<string>"
} },
"discount": { "list": [] },
"notification": {}
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
companyId: '<string>',
active: true,
deleted: true,
setting: {re1to1: true, successChargeDay: true, cardAuth: true},
checkout: {tracking: {meta: '<string>', gtm: '<string>'}},
discount: {list: []},
notification: {}
})
};
fetch('https://sandbox.api.veepag.com/v1/product', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.api.veepag.com/v1/product",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'companyId' => '<string>',
'active' => true,
'deleted' => true,
'setting' => [
're1to1' => true,
'successChargeDay' => true,
'cardAuth' => true
],
'checkout' => [
'tracking' => [
'meta' => '<string>',
'gtm' => '<string>'
]
],
'discount' => [
'list' => [
]
],
'notification' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.veepag.com/v1/product"
payload := strings.NewReader("{\n \"companyId\": \"<string>\",\n \"active\": true,\n \"deleted\": true,\n \"setting\": {\n \"re1to1\": true,\n \"successChargeDay\": true,\n \"cardAuth\": true\n },\n \"checkout\": {\n \"tracking\": {\n \"meta\": \"<string>\",\n \"gtm\": \"<string>\"\n }\n },\n \"discount\": {\n \"list\": []\n },\n \"notification\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.veepag.com/v1/product")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyId\": \"<string>\",\n \"active\": true,\n \"deleted\": true,\n \"setting\": {\n \"re1to1\": true,\n \"successChargeDay\": true,\n \"cardAuth\": true\n },\n \"checkout\": {\n \"tracking\": {\n \"meta\": \"<string>\",\n \"gtm\": \"<string>\"\n }\n },\n \"discount\": {\n \"list\": []\n },\n \"notification\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.veepag.com/v1/product")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyId\": \"<string>\",\n \"active\": true,\n \"deleted\": true,\n \"setting\": {\n \"re1to1\": true,\n \"successChargeDay\": true,\n \"cardAuth\": true\n },\n \"checkout\": {\n \"tracking\": {\n \"meta\": \"<string>\",\n \"gtm\": \"<string>\"\n }\n },\n \"discount\": {\n \"list\": []\n },\n \"notification\": {}\n}"
response = http.request(request)
puts response.read_body{
"_id": "product_id",
"companyId": "company_id",
"active": true,
"deleted": false
}{
"error_messages": [
{
"msg": "Payload invalido.",
"type": "field",
"path": "companyId",
"location": "body"
}
],
"code": "ZodValidationException",
"path": "/v1/product",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unauthorized."
}
],
"code": "unauthorized",
"path": "/v1/product",
"metadata": {}
}{
"error_messages": [
{
"msg": "Forbidden."
}
],
"code": "forbidden",
"path": "/v1/product",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unknown server error."
}
],
"code": "unknown_server_error",
"path": "/v1/product",
"metadata": {}
}Authorizations
API key no formato keyId.secret.
Body
ID da empresa dona do produto.
Indica se o produto esta ativo.
Indica exclusao logica do produto.
Configuracoes gerais do produto.
Show child attributes
Show child attributes
Regras de cobranca do produto, como frequencia, tentativas e metodos de pagamento.
Show child attributes
Show child attributes
Dados comerciais do produto, como title, price e warranty.
Show child attributes
Show child attributes
Regra de cancelamento da assinatura vinculada ao produto.
Show child attributes
Show child attributes
Configuracoes de checkout do produto.
Show child attributes
Show child attributes
Configuracoes de envio ou entrega associadas ao produto.
Show child attributes
Show child attributes
Configuracoes de desconto do produto.
Show child attributes
Show child attributes
Configuracoes de notificacao do produto.
Show child attributes
Show child attributes
Response
Produto criado.
ID do produto.
ID da empresa dona do produto.
Indica se o produto esta ativo.
Indica exclusao logica do produto.
Dados comerciais do produto, como title e price.
Regras de cobranca do produto.
Configuracoes gerais do produto.
Regra de cancelamento vinculada ao produto.
Show child attributes
Show child attributes
Was this page helpful?
