Payload |
Code Block |
---|
language | js |
---|
title | JSON Schema |
---|
collapse | true |
---|
| {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"external": {
"type": "object",
"properties": {
"orderId": {
"description": "Identificador externo del pago",
"type": "string"
},
"orderConsolidatorId": {
"description": "Identificador externo del agrupador del pago",
"type": "string"
}
},
"required": [
"orderId",
"orderConsolidatorId"
]
},
"paymentDate": {
"description": "Fecha en la que se realiza el pago",
"type": "string",
"format": "date-time"
},
"parentGuardian": {
"type": "object",
"properties": {
"refId": {
"description": "Id en BDC de la persona que está realizando el pago",
"type": "string",
"format": "uuid"
"maxLength": 36,
"minLength": 36
},
"document": {
"typedescription": "string"
Documento de identificación de la persona que está realizando el pago (CPF)",
"type": "string"
}
},
"required": [
"refId",
"document"
]
},
"paymentMethod": {
"typedescription": "string"
}Identificador del método de pago, es el campo parametro en la tabla forma_pago",
"type": "string",
"conciliationAccountminLength": {0,
"typemaxLength": "string"10
},
"priceconciliationAccount": {
"typedescription": "number",
"exclusiveMinimum": 0
},
"originalPrice": {Identificador del concentrador de pago, es el campo parametro en la tabla concentra_pago",
"type": "string",
"typeminLength": "number"0,
"exclusiveMinimummaxLength": 06
},
"itemListprice": {
"typedescription": "arrayPrecio final a pagar, después de markup, descuentos, impuestos y cargos",
"uniqueItemstype": true"number",
"minItemsexclusiveMinimum": 0
1 },
"itemsoriginalPrice": [
{
"description": "Precio inicial a pagar, antes de markup, descuentos, impuestos y cargos",
"type": "number",
"exclusiveMinimum": 0
},
"discountList": {
"description": "Lista de descuentos aplicados al total de la compra, si hay más de 2 descuentos aplicados estos se acumulan en el segundo/último descuento",
"type": "array",
"uniqueItems": true,
"minItems": 1,
"maxItems": 2,
"items": [
{
"type": "object",
"properties": {
"rate": {
"description": "Indica el porcentaje del descuento",
"type": "number",
"exclusiveMinimum": 0
},
"amount": {
"description": "Indica el valor correspondiente al porcentaje del descuento",
"type": "number",
"exclusiveMinimum": 0
}
},
"required": [
"rate",
"amount"
]
}
]
},
"itemList": {
"description": "Lista de paquetes vendidos",
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": [
{
"type": "object",
"properties": {
"articleRefId": {
"description": "Id en BDC del artículo/paquete",
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36
},
"student": {
"type": "object",
"properties": {
"refId": {
"description": "Id en BDC del alumno",
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36
},
"personRefId": {
"description": "Id en BDC de la persona asociada al alumno",
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36
}
},
"required": [
"refId",
"personRefId"
]
},
"totalItem": {
"description": "Cantidad vendida del artículo/paquete",
"type": "integer",
"exclusiveMinimum": 0
},
"price": {
"description": "Precio final del artículo/paquete, después de markup, descuentos, impuestos y cargos",
"type": "number",
"exclusiveMinimum": 0
},
"originalPrice": {
"description": "Precio inicial del artículo/paquete, antes de markup, descuentos, impuestos y cargos",
"type": "number",
"exclusiveMinimum": 0
},
"discountList": {
"description": "Lista de descuentos aplicados al artículo/paquete, si hay más de 3 descuentos aplicados estos se acumulan en el tercer/último descuento",
"type": "array",
"uniqueItems": true,
"minItems": 1,
"maxItems": 3,
"items": [
{
"type": "object",
"properties": {
"rate": {
"description": "Indica el porcentaje del descuento",
"type": "number",
"exclusiveMinimum": 0
},
"reason": {
"description": "Identificador de la razón del descuento, es el campo parametro en la tabla razon",
"type": "string",
"minLength": 0,
"maxLength": 16
},
"amount": {
"description": "Indica el valor correspondiente al porcentaje del descuento",
"type": "number",
"exclusiveMinimum": 0
}
},
"required": [
"rate",
"reason",
"amount"
]
}
]
},
"taxes": {
"description": "Valor de los impuestos aplicados al artículo/paquete, correspondiente al porcentaje de impuestos",
"type": "objectinteger",
"propertiesminimum": { 0
},
"articleRefIdtaxRate": {
"typedescription": "stringPorcentaje de impuestos aplicados al artículo/paquete",
"formattype": "uuidinteger",
"maxLengthminimum": 36 0
},
"minLengthsalesType": 36{
}"description": "Identificador del tipo de venta, es el campo parametro en la tabla tipo_venta",
"studenttype": {"string",
"typeminLength": "object"0,
"propertiesmaxLength": {14
},
"refIdsalesChannel": {
"typedescription": "stringIdentificador del canal de venta, es el campo parametro en la tabla canal_venta",
"formattype": "uuidstring",
"maxLengthminLength": 360,
"minLengthmaxLength": 3610
},
"salesOption": {
"personRefId": {
description": "Identificador de la opción de venta, es el campo parametro en la tabla opcion_venta",
"type": "string",
"formatminLength": "uuid"0,
"maxLength": 36,3
},
"minLengthcomponentList": 36{
}"description": "Lista de los artículos/componentes que forman parte del artículo/paquete vendidos, este atributo solo debe estar presente cuando es un pago de una venta fraccionada",
}"type": "array",
"requireditems": [
"refId",{
"personRefId" "type": "object",
]
"properties": {
},
"totalItemarticleRefId": {
"typedescription": "integerId en BDC del artículo/componente",
"exclusiveMinimumtype": 0"string",
},
"priceformat": {"uuid",
"typemaxLength": "number"36,
"exclusiveMinimumminLength": 036
},
"originalPrice": {
},
"type": "number",
"exclusiveMinimumtotalItem": 0{
},
"taxesdescription": { "Cantidad vendida del artículo/paquete",
"type": "integer",
"minimumexclusiveMinimum": 0
},
"taxRateprice": {
"typedescription": "integer",
"minimum": 0
}Precio final del artículo/componente, después de markup, descuentos, impuestos y cargos",
"salesType": {
"type": "stringnumber",
},
"salesChannelexclusiveMinimum": {0
"type": "string"
},
"salesOption": {
"typeoriginalPrice": "string"{
},
"componentListdescription": {
"type": "array",
"items": [ "Precio inicial del artículo/paquete, antes de markup, descuentos, impuestos y cargos",
{
"type": "objectnumber",
"propertiesexclusiveMinimum": {0
"articleRefId": {
},
"typemarkupRate": "string",{
"formatdescription": "uuid",
"maxLengthtype": 36"number",
"minLengthminimum": 360
},
"totalItemtaxes": {
"typedescription": "integer",
"exclusiveMinimum": 0
},
"price": {Valor de los impuestos aplicados al artículo/componente, correspondiente al porcentaje de impuestos",
"type": "number",
"exclusiveMinimumminimum": 0
},
"originalPricetaxRate": {
"typedescription": "numberPorcentaje de impuestos aplicados al artículo/componente",
"exclusiveMinimumtype": 0"number",
}, "minimum": 0
"markupRate": {
},
"typediscountList": "number",{
"minimumdescription": 0
},
"taxes": {"Lista de descuentos aplicados al artículo/componente, solo puede indicarse el tipo de descuento por venta fraccionada",
"type": "numberarray",
"minimumuniqueItems": 0
true,
},
"taxRateminItems": {1,
"typemaxItems": "number"1,
"minimumitems": 0[
},
{
"discountList": {
"type": "arrayobject",
"uniqueItemsproperties": true,{
"minItemsrate": 1,
{
"itemsdescription": ["Indica el porcentaje del descuento",
{ "type": "number",
"typeexclusiveMinimum": "object",0
"properties": {
},
"ratereason": {
"typedescription": "numberIdentificador de la razón del descuento, es el campo parametro en la tabla razon, al ser venta fraccionada solo se acepta el valor VEFR",
"exclusiveMinimumtype": 0"string",
},
"maxLength": 4,
"reasonminLength": {4
"type": "string"},
},
"amount": {
"amountdescription": {"Indica el valor correspondiente al porcentaje del descuento",
"type": "number",
"exclusiveMinimum": 0
}
},
"required": [
"rate",
"reason",
"amount"
]
}
]
}
},
"required": [
"articleRefId",
"totalItem",
"price",
"originalPrice",
"markupRate",
"taxes",
"taxRate",
"discountList"
]
}
]
}
},
"required": [
"articleRefId",
"student",
"totalItem",
"price",
"originalPrice",
"taxes",
"taxRate",
"salesType",
"salesChannel",
"salesOption",
"componentList"
]
}
]
},
"freight": {
"type": "object",
"properties": {
"transportName": {
"type": "string"
},
"transportPhone": {
"type": "string"
},
"transportCode": {
"type": "string"
},
"orderNote": {
"type": "string"
},
"orderFreightValue": {
"type": "number"
},
"orderDeliveryForecast": {
"type": "string"
},
"orderEstablishment": {
"type": "string"
}
},
"required": [
"transportName",
"transportPhone",
"transportCode",
"orderNote",
"orderFreightValue",
"orderDeliveryForecast",
"orderEstablishment"
]
},
"addressList": {
"description": "Lista de domicilios asociados a la persona que realiza el pago"
"type": "array"",
"uniqueItems": true,
"uniqueItemsminItems": true2,
"minItemsmaxItems": 23,
"items": [
{
"type": "object",
"properties": {
"address": {
"type": "object",
"properties": {
"addressType": {
"description": "Indicador del tipo de domicilio, solo puede tener 3 valores (Physical, Mailing, Shipping)",
"type": "string",
"maxLength": 7,
"minLength": 8
},
"street": {
"type": "string"
},
"outdoorNumber": {
"type": "string"
},
"interiorNumber": {
"type": "string"
},
"neighborhood": {
"type": "string"
},
"city": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"county": {
"type": "object",
"properties": {
"refId": {
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36
},
"countyCode": {
"type": "string"
}
},
"required": [
"refId",
"countyCode"
]
},
"contact": {
"type": "string"
},
"phone": {
"type": "string"
},
"phone2": {
"type": "string"
},
"position": {
"type": "string"
},
"officeHours": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"timeZone": {
"type": "object",
"properties": {
"refId": {
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36
}
},
"required": [
"refId"
]
},
"language": {
"type": "object",
"properties": {
"refId": {
"type": "string",
"format": "uuid",
"maxLength": 36,
"minLength": 36
}
},
"required": [
"refId"
]
},
"active": {
"type": "boolean"
}
},
"required": [
"addressType",
"street",
"outdoorNumber",
"interiorNumber",
"neighborhood",
"city",
"postalCode",
"county",
"contact",
"phone",
"phone2",
"position",
"officeHours",
"email",
"timeZone",
"language",
"active"
]
}
},
"required": [
"address"
]
}
]
},
"transaction": {
"type": "object",
"properties": {
"installments": {
"type": "number",
"exclusiveMinimum": 0
}
}
}
},
"required": [
"external",
"paymentDate",
"parentGuardian",
"paymentMethod",
"conciliationAccount",
"price",
"originalPrice",
"itemList",
"freight",
"addressList",
"transaction"
]
} |
Code Block |
---|
language | js |
---|
title | Ejemplo - Pago por paquete |
---|
collapse | true |
---|
| {
"external": {
"orderId": "9d4d296d-f9c7-4ce8-96c5-9721cdd2c8d5",
"orderConsolidatorId": "9d4d296d-f9c7-4ce8-96c5-9721cdd2c8d5"
},
"paymentDate": "2023-06-07T16:21:38+00:00",
"parentGuardian": {
"refId": "00000000-0000-1000-0000-000012282310",
"document": "03915826588"
},
"paymentMethod": "TCV",
"conciliationAccount": "YAPY",
"price": 1118.5200,
"originalPrice": 4406.8000,
"discountList": [
{
"porcentagerate": 74.6183,
"amount": 3288.2800
}
],
"itemList": [
{
"articleRefId": "00000000-0000-1000-0000-000000118094",
"student": {
"refId": "00000000-0000-1000-0000-000020096053",
"personRefId": "00000000-0000-1000-0000-000012271661"
},
"totalItem": 1,
"price": 559.2617,
"originalPrice": 2203.398,
"discountList": [
{
"porcentagerate": 23.7097,
"reason": "COM",
"amount": 522.4191
},
{
"porcentagerate": 66.73,
"reason": "FFS",
"amount": 1121.7172
}
],
"porcentageTaxestaxes": 00.0000,
"taxestaxRate": 0.0000,
"salesType": "VENTA",
"salesChannel": "ALU",
"installments": 1
},
{
"articleRefId": "00000000-0000-1000-0000-000000118095",
"student": {
"refId": "00000000-0000-1000-0000-000020096149",
"personRefId": "00000000-0000-1000-0000-000012271845"
},
"totalItem": 1,
"price": 559.2617,
"originalPrice": 2203.398,
"discountList": [
{
"porcentagerate": 23.7097,
"reason": "COM",
"amount": 522.4191
},
{
"porcentagerate": 66.737300,
"reason": "HP",
"amount": 1121.7172
}
],
"porcentageTaxestaxes": 0.0000,
"taxestaxRate": 0.0000,
"salesType": "VENTA",
"salesChannel": "ALU",
"installments": 1
}
],
"freight": {
"transportName": "",
"transportPhone": "",
"transportCode": "",
"orderNote": "",
"orderFreightValue": 0,
"orderDeliveryForecast": "dd/mm/yyyy",
"orderEstablishment": ""
},
"addressList": [
{
"address": {
"addressType": "Physical",
"street": "Rua Gavião Peixoto",
"outdoorNumber": "313",
"interiorNumber": "",
"neighborhood": "Icaraí",
"city": "RIO DE JANEIRO",
"postalCode": "24230092",
"county": {
"refId": "00000000-0000-1000-0000-000000020226",
"countyCode": "BE402DF"
},
"contact": "Alfredo Pai",
"phone": "",
"phone2": "12345678901",
"position": "Contacto Principal",
"officeHours": "",
"email": "test@test.com",
"timeZone": {
"refId": "00000000-0000-1000-0000-000000000028"
},
"language": {
"refId": "00000000-0000-1000-0000-000000000017"
},
"active": true
}
},
{
"address": {
"addressType": "Mailing",
"street": "Rua Gavião Peixoto",
"outdoorNumber": "313",
"interiorNumber": "",
"neighborhood": "Icaraí",
"city": "RIO DE JANEIRO",
"postalCode": "24230092",
"county": {
"refId": "00000000-0000-1000-0000-000000020226",
"countyCode": "BE402DF"
},
"contact": "Alfredo Pai",
"phone": "",
"phone2": "12345678901",
"position": "Contacto Principal",
"officeHours": "",
"email": "test@test.com",
"timeZone": {
"refId": "00000000-0000-1000-0000-000000000028"
},
"language": {
"refId": "00000000-0000-1000-0000-000000000017"
},
"active": true
}
}
],
"transaction": {}
} |
Code Block |
---|
language | js |
---|
title | Ejemplo - Pago fraccionado |
---|
collapse | true |
---|
| {
"external": {
"orderId": "9d4d296d-f9c7-4ce8-96c5-9721cdd2c8d5",
"orderConsolidatorId": "9d4d296d-f9c7-4ce8-96c5-9721cdd2c8d5"
},
"paymentDate": "2023-06-07T16:21:38+00:00",
"parentGuardian": {
"refId": "00000000-0000-1000-0000-000012431581",
"document": "27288324800"
},
"paymentMethod": "PWM",
"conciliationAccount": "",
"price": 760.73,
"originalPrice": 760.73,
"itemList": [
{
"articleRefId": "00000000-0000-1000-0000-000000118090",
"student": {
"refId": "00000000-0000-1000-0000-000020700764",
"personRefId": "00000000-0000-1000-0000-000012147907"
},
"totalItem": 1,
"price": 741.12,
"originalPrice": 741.12,
"porcentageTaxtaxes": 0.0000,
"taxestaxRate": 0.0000,
"salesType": "VENTA",
"salesChannel": "ALU",
"salesOption": "OB",
"installments": 1,
"componentList": [
{
"articleRefId": "00000000-0000-1000-0000-000000094355",
"totalItem": 1,
"price": 143.2523,
"originalPrice": 219,
"markupPorcentagemarkupRate": 20.0000,
"taxes": 0.0000,
"porcentageTaxtaxRate": 0.0000,
"discountList": [
{
"porcentagerate": 45.494900,
"reason": "VEFR",
"amount": 119.5477
}
]
},
{
"articleRefId": "00000000-0000-1000-0000-00000094584",
"totalItem": 1,
"price": 66.7202,
"originalPrice": 102,
"markupPorcentagemarkupRate": 20.0000,
"taxes": 0.0000,
"porcentageTaxtaxRate": 0.0000,
"discountList": [
{
"porcentagerate": 45.494900,
"reason": "VEFR",
"amount": 55.6798
}
]
},
{
"articleRefId": "00000000-0000-1000-0000-000000094294",
"totalItem": 1,
"price": 138.6734,
"originalPrice": 212,
"markupPorcentagemarkupRate": 20.0000,
"taxes": 0.0000,
"porcentageTaxtaxRate": 0.0000,
"discountList": [
{
"porcentagerate": 45.494900,
"reason": "VEFR",
"amount": 115.7266
}
]
},
{
"articleRefId": "00000000-0000-1000-0000-000000094344",
"totalItem": 1,
"price": 138.6734,
"originalPrice": 212,
"markupPorcentagemarkupRate": 20.0000,
"taxes": 0.0000,
"porcentageTaxtaxRate": 0.0000,
"discountList": [
{
"porcentagerate": 45.494900,
"reason": "VEFR",
"amount": 115.7266
}
]
},
{
"articleRefId": "00000000-0000-1000-0000-000000094291",
"totalItem": 1,
"price": 138.6734,
"originalPrice": 212,
"markupPorcentagemarkupRate": 20.0000,
"taxes": 0.0000,
"porcentageTaxtaxRate": 0.0000,
"discountList": [
{
"porcentagerate": 45.494900,
"reason": "VEFR",
"amount": 115.7266
}
]
},
{
"articleRefId": "00000000-0000-1000-0000-000000094604",
"totalItem": 1,
"price": 115.1251,
"originalPrice": 176,
"markupPorcentagemarkupRate": 20,
"taxes": 0,
"porcentageTaxtaxRate": 0,
"discountList": [
{
"porcentagerate": 45.49,
"reason": "VEFR",
"amount": 96.0749
}
]
}
]
}
],
"freight": {
"transportName": "",
"transportPhone": "",
"transportCode": "",
"orderNote": "",
"orderFreightValue": 19.61,
"orderDeliveryForecast": "2023-06-07T16:21:38+00:00",
"orderEstablishment": ""
},
"addressList": [
{
"address": {
"addressType": "Physical",
"street": "Rua Gavião Peixoto",
"outdoorNumber": "313",
"interiorNumber": "",
"neighborhood": "Icaraí",
"city": "RIO DE JANEIRO",
"postalCode": "24230092",
"county": {
"refId": "00000000-0000-1000-0000-000000020226",
"countyCode": "BE402DF"
},
"contact": "Alfredo Pai",
"phone": "",
"phone2": "12345678901",
"position": "Contacto Principal",
"officeHours": "",
"email": "test@test.com",
"timeZone": {
"refId": "00000000-0000-1000-0000-000000000028"
},
"language": {
"refId": "00000000-0000-1000-0000-000000000017"
},
"active": true
}
},
{
"address": {
"addressType": "Mailing",
"street": "Rua Gavião Peixoto",
"outdoorNumber": "313",
"interiorNumber": "",
"neighborhood": "Icaraí",
"city": "RIO DE JANEIRO",
"postalCode": "24230092",
"county": {
"refId": "00000000-0000-1000-0000-000000020226",
"countyCode": "BE402DF"
},
"contact": "Alfredo Pai",
"phone": "",
"phone2": "12345678901",
"position": "Contacto Principal",
"officeHours": "",
"email": "test@test.com",
"timeZone": {
"refId": "00000000-0000-1000-0000-000000000028"
},
"language": {
"refId": "00000000-0000-1000-0000-000000000017"
},
"active": true
}
}
],
"transaction": {}
} |
|
---|