{"swagger":"2.0","info":{"description":"4Q billing service","version":"1.0.0","title":"4Q billing service","contact":{"email":"soporte@exsim.com.mx"},"license":{"name":"Go to the 4Q billing service","url":"http://18.234.168.217:7000/exsim/rest/metodo"}},"tags":[{"name":"Post invoice for certification","description":""},{"name":"Request notification","description":""},{"name":"Invoice status","description":""},{"name":"Invoice Files","description":""},{"name":"List of invoices","description":""}],"paths":{"/Invoice":{"get":{"tags":["List of invoices"],"summary":"","operationId":"requestInvoice","description":"The following method obtains the status of the indicated invoice\n","produces":["application/json"],"parameters":[{"in":"query","name":"Token","description":"Value given to the client to request access to the API","required":true,"type":"string"},{"in":"query","name":"TaxID","description":"Seller's tax identifier","required":true,"type":"string","format":"query"},{"in":"query","name":"invoice","description":"invoice key to search","required":true,"type":"string","format":"query"}],"responses":{"200":{"description":"search results matching criteria","schema":{"type":"array","items":{"$ref":"#/definitions/InvoiceResponse"}}},"400":{"description":"bad input parameter"}}}},"/InvoiceFiles":{"get":{"tags":["Invoice Files"],"summary":"","operationId":"requestInvoiceFiles","description":"The following method obtains the status of the indicated invoice\n","produces":["application/json"],"parameters":[{"in":"query","name":"Token","description":"Value given to the client to request access to the API","required":true,"type":"string"},{"in":"query","name":"TaxID","description":"Seller's tax identifier","required":true,"type":"string","format":"query"},{"in":"query","name":"invoice","description":"invoice key to search","required":true,"type":"string","format":"query"}],"responses":{"200":{"description":"search results matching criteria","schema":{"type":"array","items":{"$ref":"#/definitions/InvoiceFilesResponse"}}},"400":{"description":"bad input parameter"}}}},"/Notifications":{"get":{"tags":["Request notification"],"summary":"","operationId":"requestNotification","description":"Register an email request.\nThe method returns a successful call (OK) if no error occurred.\nThe message will be sent later.\n","produces":["application/json"],"parameters":[{"in":"query","name":"Token","description":"Value given to the client to request access to the API","required":true,"type":"string"},{"in":"query","name":"TaxID","description":"Seller's tax identifier","required":true,"type":"string","format":"query"},{"in":"query","name":"invoice","description":"invoice key to search","required":true,"type":"string","format":"query"}],"responses":{"200":{"description":"search results matching criteria","schema":{"type":"array","items":{"$ref":"#/definitions/NotificationResponse"}}},"400":{"description":"bad input parameter"}}}},"/InvoiceEstatus":{"get":{"tags":["Invoice status"],"summary":"","operationId":"searchInventory","description":"The following method obtains the status of the indicated invoice\n","produces":["application/json"],"parameters":[{"in":"query","name":"Token","description":"Value given to the client to request access to the API","required":true,"type":"string"},{"in":"query","name":"TaxID","description":"Seller's tax identifier","required":true,"type":"string","format":"query"},{"in":"query","name":"invoice","description":"invoice key to search","required":true,"type":"string","format":"query"}],"responses":{"200":{"description":"search results matching criteria","schema":{"type":"array","items":{"$ref":"#/definitions/StatusResponse"}}},"400":{"description":"bad input parameter"}}}},"/RegisterInvoice":{"post":{"tags":["Post invoice for certification"],"summary":"","operationId":"addinvoice","description":"Use the following method to register an invoice on the server and it can be certified","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"query","name":"Token","description":"Value given to the client to request access to the API","required":true,"type":"string"},{"in":"query","name":"TaxID","description":"Seller's tax identifier","required":true,"type":"string","format":"query"},{"in":"body","name":"inventoryItem","description":"Inventory item to add","schema":{"$ref":"#/definitions/RegisterInvoiceRequest"}}],"responses":{"201":{"description":"item created"},"400":{"description":"invalid input, object invalid"},"409":{"description":"an existing item already exists"}}}}},"definitions":{"StatusResponse":{"type":"object","properties":{"registered":{"type":"string","example":"Y/N"},"certificate":{"type":"string","example":"Y/N"},"notified":{"type":"string","example":"Y/N"},"error":{"type":"string","example":"This field only returns information when an error occurs when generating the result."}}},"NotificationResponse":{"type":"object","properties":{"registered_to_notify":{"type":"string","example":"Ok"},"error":{"type":"string","example":"This field only returns information when an error occurs when generating the result."}}},"InvoiceFilesResponse":{"type":"object","properties":{"xml":{"type":"string","format":"base64"},"pdf":{"type":"string","format":"base64"},"error":{"type":"string","example":"This field only returns information when an error occurs when generating the result."}}},"InvoiceResponse":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"string"},"example":["F00001246","F00001247"]}}},"RegisterInvoiceRequest":{"type":"object","properties":{"invoicedetails":{"$ref":"#/definitions/invoicedetails"}}},"invoicedetails":{"type":"object","properties":{"set":{"type":"string","example":"A"},"invoice":{"type":"string","example":"320"},"payment_type":{"type":"string","example":"04"},"payment_conditions":{"type":"string","example":"Contado"},"subtotal":{"type":"number","example":410.0},"currency":{"type":"string","example":"MXN"},"total":{"type":"number","example":567.82},"payment_method":{"type":"string","example":"PUE"},"postalCode":{"type":"string","example":78521},"seller":{"$ref":"#/definitions/invoiceseller"},"buyer":{"$ref":"#/definitions/invoicebuyer"},"line_items":{"type":"array","items":{"$ref":"#/definitions/line_item"}}}},"invoiceseller":{"type":"object","properties":{"rfc":{"type":"string","example":"AAA010101AAA"},"name":{"type":"string","example":"MATRIZ"},"company_type":{"type":"string","example":601}}},"invoicebuyer":{"type":"object","properties":{"rfc":{"type":"string","example":"XAXX010101000"},"name":{"type":"string","example":"Alberto Cota Barbosa"},"company_type":{"type":"string","example":"G03"}}},"line_item":{"type":"object","properties":{"product_tax_code":{"type":"string","example":10101505},"sku":{"type":"string","example":"MERM8"},"quantity":{"type":"string","example":10},"unit_of_measure_identifier":{"type":"string","example":"H87"},"unit_of_measure":{"type":"string","example":"PIEZA"},"description":{"type":"string","example":"MERMELADA MCK 24/1270 GR No. 8 FRESA"},"unit_amount":{"type":"number","example":30.0},"total_amount":{"type":"number","example":300.0},"taxes":{"$ref":"#/definitions/taxes"}}},"taxes":{"type":"object","properties":{"value_added_tax":{"type":"array","items":{"$ref":"#/definitions/value_added_tax"}},"goods_services_tax":{"type":"array","items":{"$ref":"#/definitions/value_added_tax"}}}},"value_added_tax":{"type":"object","properties":{"tax_code":{"type":"string","example":"002"},"tax_percentage":{"type":"number","example":0.16},"tax_amount":{"type":"number","example":60.72}}},"invoice_data":{"type":"object","properties":{"xml":{"type":"string","example":"Base64 string containing the invoice XML"}}}},"schemes":["https"],"host":"virtserver.swaggerhub.com","basePath":"/Exsim/4Q_Invoices_services/1.0.0"}