cURL
curl --request PATCH \
--url https://api-v2.vitau.mx/api/orders/{id}/request-invoice/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"full_name": "<string>",
"rfc": "<string>",
"street": "<string>",
"exterior_number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"zipcode": "<string>",
"cfdi_use": "<string>",
"fiscal_regime": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"email": "jsmith@example.com"
}
'import requests
url = "https://api-v2.vitau.mx/api/orders/{id}/request-invoice/"
payload = {
"full_name": "<string>",
"rfc": "<string>",
"street": "<string>",
"exterior_number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"zipcode": "<string>",
"cfdi_use": "<string>",
"fiscal_regime": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"email": "jsmith@example.com"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
full_name: '<string>',
rfc: '<string>',
street: '<string>',
exterior_number: '<string>',
neighborhood: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
zipcode: '<string>',
cfdi_use: '<string>',
fiscal_regime: '<string>',
latitude: '<string>',
longitude: '<string>',
email: 'jsmith@example.com'
})
};
fetch('https://api-v2.vitau.mx/api/orders/{id}/request-invoice/', 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://api-v2.vitau.mx/api/orders/{id}/request-invoice/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => '<string>',
'rfc' => '<string>',
'street' => '<string>',
'exterior_number' => '<string>',
'neighborhood' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'zipcode' => '<string>',
'cfdi_use' => '<string>',
'fiscal_regime' => '<string>',
'latitude' => '<string>',
'longitude' => '<string>',
'email' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <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://api-v2.vitau.mx/api/orders/{id}/request-invoice/"
payload := strings.NewReader("{\n \"full_name\": \"<string>\",\n \"rfc\": \"<string>\",\n \"street\": \"<string>\",\n \"exterior_number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"cfdi_use\": \"<string>\",\n \"fiscal_regime\": \"<string>\",\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<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.patch("https://api-v2.vitau.mx/api/orders/{id}/request-invoice/")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"<string>\",\n \"rfc\": \"<string>\",\n \"street\": \"<string>\",\n \"exterior_number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"cfdi_use\": \"<string>\",\n \"fiscal_regime\": \"<string>\",\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.vitau.mx/api/orders/{id}/request-invoice/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"<string>\",\n \"rfc\": \"<string>\",\n \"street\": \"<string>\",\n \"exterior_number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"cfdi_use\": \"<string>\",\n \"fiscal_regime\": \"<string>\",\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"details": [
{
"product": 123,
"quantity": 16383,
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"price": "<string>",
"subtotal": "<string>",
"total": "<string>",
"discount": "<string>",
"iva": "<string>",
"order": 123
}
],
"patient": 123,
"payment_method": 123,
"id": 123,
"shipping": 123,
"store": 123,
"payment": 123,
"paypal_agreement": 123,
"invoicing": 123,
"coupon": "<string>",
"shipping_method": 123,
"prescriptions": [
{
"document": "<string>",
"issue_date": "2023-12-25",
"id": 123,
"document_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"expiring_date": "2023-12-25",
"is_verified": true,
"patient": 123,
"order": 123,
"updated_by": 123
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"insurance_refund_status": "not_started",
"order_status": "quoted",
"payment_status": "unpaid",
"rejection_reason": "<string>",
"origin": "<string>",
"subtotal": "<string>",
"iva": "<string>",
"shipping_price": "<string>",
"shipping_discount": "<string>",
"shipping_cost": "<string>",
"discount": "<string>",
"total": "<string>",
"payment_date": "2023-11-07T05:31:56Z",
"shipping_date": "2023-11-07T05:31:56Z",
"expected_delivery_date": "2023-11-07T05:31:56Z",
"max_delivery_date": "2023-11-07T05:31:56Z",
"receiving_date": "2023-11-07T05:31:56Z",
"folio": "<string>",
"cfdi": "<string>",
"external_payment_id": "<string>",
"generated_by": 123,
"updated_by": 123,
"reminder": 123,
"subscription": 123
}API Reference
Request Invoice
PATCH
/
api
/
orders
/
{id}
/
request-invoice
/
cURL
curl --request PATCH \
--url https://api-v2.vitau.mx/api/orders/{id}/request-invoice/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"full_name": "<string>",
"rfc": "<string>",
"street": "<string>",
"exterior_number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"zipcode": "<string>",
"cfdi_use": "<string>",
"fiscal_regime": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"email": "jsmith@example.com"
}
'import requests
url = "https://api-v2.vitau.mx/api/orders/{id}/request-invoice/"
payload = {
"full_name": "<string>",
"rfc": "<string>",
"street": "<string>",
"exterior_number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"zipcode": "<string>",
"cfdi_use": "<string>",
"fiscal_regime": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"email": "jsmith@example.com"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
full_name: '<string>',
rfc: '<string>',
street: '<string>',
exterior_number: '<string>',
neighborhood: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
zipcode: '<string>',
cfdi_use: '<string>',
fiscal_regime: '<string>',
latitude: '<string>',
longitude: '<string>',
email: 'jsmith@example.com'
})
};
fetch('https://api-v2.vitau.mx/api/orders/{id}/request-invoice/', 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://api-v2.vitau.mx/api/orders/{id}/request-invoice/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => '<string>',
'rfc' => '<string>',
'street' => '<string>',
'exterior_number' => '<string>',
'neighborhood' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'zipcode' => '<string>',
'cfdi_use' => '<string>',
'fiscal_regime' => '<string>',
'latitude' => '<string>',
'longitude' => '<string>',
'email' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <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://api-v2.vitau.mx/api/orders/{id}/request-invoice/"
payload := strings.NewReader("{\n \"full_name\": \"<string>\",\n \"rfc\": \"<string>\",\n \"street\": \"<string>\",\n \"exterior_number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"cfdi_use\": \"<string>\",\n \"fiscal_regime\": \"<string>\",\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<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.patch("https://api-v2.vitau.mx/api/orders/{id}/request-invoice/")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"<string>\",\n \"rfc\": \"<string>\",\n \"street\": \"<string>\",\n \"exterior_number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"cfdi_use\": \"<string>\",\n \"fiscal_regime\": \"<string>\",\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.vitau.mx/api/orders/{id}/request-invoice/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"<string>\",\n \"rfc\": \"<string>\",\n \"street\": \"<string>\",\n \"exterior_number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"cfdi_use\": \"<string>\",\n \"fiscal_regime\": \"<string>\",\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"details": [
{
"product": 123,
"quantity": 16383,
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"price": "<string>",
"subtotal": "<string>",
"total": "<string>",
"discount": "<string>",
"iva": "<string>",
"order": 123
}
],
"patient": 123,
"payment_method": 123,
"id": 123,
"shipping": 123,
"store": 123,
"payment": 123,
"paypal_agreement": 123,
"invoicing": 123,
"coupon": "<string>",
"shipping_method": 123,
"prescriptions": [
{
"document": "<string>",
"issue_date": "2023-12-25",
"id": 123,
"document_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"expiring_date": "2023-12-25",
"is_verified": true,
"patient": 123,
"order": 123,
"updated_by": 123
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"insurance_refund_status": "not_started",
"order_status": "quoted",
"payment_status": "unpaid",
"rejection_reason": "<string>",
"origin": "<string>",
"subtotal": "<string>",
"iva": "<string>",
"shipping_price": "<string>",
"shipping_discount": "<string>",
"shipping_cost": "<string>",
"discount": "<string>",
"total": "<string>",
"payment_date": "2023-11-07T05:31:56Z",
"shipping_date": "2023-11-07T05:31:56Z",
"expected_delivery_date": "2023-11-07T05:31:56Z",
"max_delivery_date": "2023-11-07T05:31:56Z",
"receiving_date": "2023-11-07T05:31:56Z",
"folio": "<string>",
"cfdi": "<string>",
"external_payment_id": "<string>",
"generated_by": 123,
"updated_by": 123,
"reminder": 123,
"subscription": 123
}Authorizations
APIKeyAuthJWTAuthCookieAuth
Path Parameters
A unique integer value identifying this order.
Body
application/json
Required string length:
1 - 100Required string length:
1 - 20Maximum string length:
250Maximum string length:
20Maximum string length:
100Maximum string length:
100Maximum string length:
100Maximum string length:
100Maximum string length:
20Maximum string length:
4Maximum string length:
3Maximum string length:
254Response
200 - application/json
Show child attributes
Show child attributes
Required string length:
1 - 16Show child attributes
Show child attributes
Available options:
not_started, missing_data, sent_to_broker, sent_to_insurer, approved_by_insurer Available options:
quoted, pending_approval, approved, in_process, ready, shipped, delivered, cancelled, delayed, shortage Available options:
unpaid, credit, paid, in_process, processing, rejected Minimum string length:
1Maximum string length:
20Maximum string length:
20Minimum string length:
1Minimum string length:
1Was this page helpful?