Devolución parcial

Ejemplo:

mutation{
	# Ejemplo de creacion de nota credito
	createCreditNote(document: {
		# ID de la unidad organizacional
			organizationalUnitId: "310730d9-c662-44c2-85ce-2ff510644c76"
		
		# Consecutivo de la nota credito
		id: {
			number: 2345
			prefix: "CNT"
		}
		
		# Consecutivo de la factura a modificar
		invoiceToModify:{
			id: {
				number: 13321
				prefix: "SETT"
			}
			uid: "310730d9-c662-44c2-85ce-2ff510644c76"
		}
		
		# Información de los productos o servicios
		documentLines: [
			{
				description: {
					locale: ES_CO
					text: "Urbano X6 Exento I-II 2020-11-01 a 2020-11-30"
				}
				itemDescription: {
					brandName: "asd"
					standardItemId: {
						id: "1234"
						standardId: GTIN
					}
					incomeType: SELF_OWNED
				}
				lineExtensionAmount: "57750"
				priceModifier: [
					{
						amount: "5500"
						baseAmount: "55000"
						chargeIndicator: CHARGE
						percentage: 10
						reason: {
							locale: EN_US
							text: "Some text"
						}
						reasonCode: M00
					}
					{
						amount: "2750"
						baseAmount: "55000"
						chargeIndicator: DISCOUNT
						percentage: 5
						reason: {
							locale: EN_US
							text: "Some text"
						}
						reasonCode: M00
					}
				]
				lineId: 1
				note: {
					locale: EN_US
					text: "Some text"
				}
				price: {
					priceAmount: "55000"
					baseQuantity: 1 # Obligatorio
					unitCode: CO_ZZ # Obligatorio
					priceType: COMMERCIAL_VALUE
					priceChangeReason: "text"
				}
				quantity: "1"
				taxDescription: [
					{
						taxName: CO_01
						taxAmount: "0"
						roundingAmount: "0"
						taxSubtotal: [
							{
								taxAmount: "0"
								percent: 0
								taxableAmount: "57750"
							}
						]
					}
				]
				withholdingsDescription: [
					{
						withholdingName: CO_05
						withholdingAmount: "8662.5"
						roundingAmount: "0"
						withholdingSubtotal: [
							{
								taxAmount: "8662.5"
								percent: 15
								taxableAmount: "57750"
							}
						]
					}
				]
				unitCode: CO_ZZ
			}
		]
		
		# Cargos o descuentos de la nota credito
		documentModifiers: [
			{
				amount: "5500"
				baseAmount: "55000"
				chargeIndicator: CHARGE
				percentage: 10
				reason: {
					locale: EN_US
					text: "Some text"
				}
				reasonCode: M00
			}
			{
				amount: "2750"
				baseAmount: "55000"
				chargeIndicator: DISCOUNT
				percentage: 5
				reason: {
					locale: EN_US
					text: "Some text"
				}
				reasonCode: M00
			}
		]
		
		# Información general de la nota credito
		generalInformation: {
			# Este correo es opcional, si usted agrega el correo del adquirente no se utilizara el correo de la factura si no el que usted proporcione en este campo.
			acquirerEmail: "ymoron14@gmail.com"
			issueDateTime: "2023-07-09T09:10:43"
			operationCode: PARTIAL_REFUND
			reasonOfIssuance: {
				locale: EN_US
				text: "Some text"
			}
			subtypeCode: CREDIT_NOTE
		}
		
		# Descripción de la forma de pago
		paymentDescription: {
			paymentMeans: {
				paymentDueDate: "2023-06-11T01:01:01"
				paymentMeanCode: CO_ZZZ
				paymentMeanId: CREDIT
				paymentTerms: {
					locale: ES_CO
					text: "Some text"
				}
			}
			prepayments: [
				{
					id: "1212313"
					instructionId: "13131231"
					paidAmount: "20000"
					paidDateTime: "2020-11-09T01:01:01"
					paymentInstructions: "123123123"
					receivedDate: "2020-11-09"
				}
			]
		}
		
		# Tipo de cambio del pago (si aplica)
		paymentExchangeRate: {
			calculationRate: "123"
			currency: COP
			date: "2020-11-09"
		}
		
		# Documentos de referencia
		referencedDocuments: {
			description: {
				locale: EN_US
				text: "Some description"
			}
			issueDate: "2020-11-09"
			referenceId: "123"
			referenceType: OTHER_DOCUMENT
			uid: "c5eee397-0cfd-42bf-b81f-1c6d3adee7ed"
		}
		
		# Estructura con la información del importe total de los impuestos / Información de los impuestos
		taxDescription: [
			{
				taxName: CO_01
				taxAmount: "0"
				roundingAmount: "0"
				taxSubtotal: [
					{
						taxAmount: "0"
						percent: 0
						taxableAmount: "57750"
					}
				]
			}
		]
		
		# Descripción de las retenciones (si aplica)
		withholdingsDescription: [
			{
				withholdingName: CO_05
				withholdingAmount: "8662.5"
				roundingAmount: "0"
				withholdingSubtotal: [
					{
						taxAmount: "8662.5"
						percent: 15
						taxableAmount: "57750"
					}
				]
			}
		]
		
		# Descripción del valor total a pagar
		documentTotals: {
			allowanceTotalAmount: "5500"
			chargeTotalAmount: "11000"
			lineExtensionAmount: "57750"
			prePaidAmount: "20000"
			taxExclusiveAmount: "57750"
			taxInclusiveAmount: "57750"
			payableAmount: "57750"
		}
	}){	
		document{
			id # Consecutivo de la resolución de la DIAN que tiene el documento
			uid # UUID del documento generado en YABI*CO
			documentUid # CUFE
			# documentQR # Contenido del código QR
		}
		errors{
			helpText
			id
			language
			message
			subType
			title
			type
		}
		warnings{
			helpText
			id
			language
			message
			subType
			title
			type
		}
		notifications{
			helpText
			id
			language
			message
			subType
			title
			type
		}
	}
}
Created:

Todos los derechos reservados © 2019-2023 - yabi•co®