# InvoiceResponse

Sample origin: <https://github.com/OpenPEPPOL/poacc-upgrade-3/blob/master/rules/examples/InvoiceResponse_Example.xml>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "ApplicationResponse": {
    "$": {
      "xmlns": "urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2",
      "xmlns:cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
      "xmlns:cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
    },
    "cbc:CustomizationID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:trns:invoice_response:3"
      }
    ],
    "cbc:ProfileID": [
      {
        "_": "urn:fdc:peppol.eu:poacc:bis:invoice_response:3"
      }
    ],
    "cbc:ID": [
      {
        "_": "imrid001"
      }
    ],
    "cbc:IssueDate": [
      {
        "_": "2017-12-01"
      }
    ],
    "cbc:IssueTime": [
      {
        "_": "12:00:00"
      }
    ],
    "cbc:Note": [
      {
        "_": "text"
      }
    ],
    "cac:SenderParty": [
      {
        "cbc:EndpointID": [
          {
            "_": "5798000012349",
            "$": {
              "schemeID": "0088"
            }
          }
        ],
        "cac:PartyIdentification": [
          {
            "cbc:ID": [
              {
                "_": "DK88776655",
                "$": {
                  "schemeID": "0184"
                }
              }
            ]
          }
        ],
        "cac:PartyLegalEntity": [
          {
            "cbc:RegistrationName": [
              {
                "_": "Buyer organization"
              }
            ]
          }
        ],
        "cac:Contact": [
          {
            "cbc:Name": [
              {
                "_": "Jens Jensen"
              }
            ],
            "cbc:Telephone": [
              {
                "_": "23232323"
              }
            ],
            "cbc:ElectronicMail": [
              {
                "_": "jj@test-company.dk"
              }
            ]
          }
        ]
      }
    ],
    "cac:ReceiverParty": [
      {
        "cbc:EndpointID": [
          {
            "_": "7330001000000",
            "$": {
              "schemeID": "0088"
            }
          }
        ],
        "cac:PartyIdentification": [
          {
            "cbc:ID": [
              {
                "_": "987654325",
                "$": {
                  "schemeID": "0192"
                }
              }
            ]
          }
        ],
        "cac:PartyLegalEntity": [
          {
            "cbc:RegistrationName": [
              {
                "_": "Seller company"
              }
            ]
          }
        ]
      }
    ],
    "cac:DocumentResponse": [
      {
        "cac:Response": [
          {
            "cbc:ResponseCode": [
              {
                "_": "RE"
              }
            ],
            "cbc:EffectiveDate": [
              {
                "_": "2018-09-24"
              }
            ],
            "cac:Status": [
              {
                "cbc:StatusReasonCode": [
                  {
                    "_": "NOA",
                    "$": {
                      "listID": "OPStatusAction"
                    }
                  }
                ],
                "cbc:StatusReason": [
                  {
                    "_": "VAT Reference not found"
                  }
                ],
                "cac:Condition": [
                  {
                    "cbc:AttributeID": [
                      {
                        "_": "BT-48"
                      }
                    ],
                    "cbc:Description": [
                      {
                        "_": "EU123456789"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "cac:DocumentReference": [
          {
            "cbc:ID": [
              {
                "_": "inv021"
              }
            ],
            "cbc:IssueDate": [
              {
                "_": "2018-09-22"
              }
            ],
            "cbc:DocumentTypeCode": [
              {
                "_": "380"
              }
            ]
          }
        ],
        "cac:IssuerParty": [
          {
            "cac:PartyIdentification": [
              {
                "cbc:ID": [
                  {
                    "_": "123456785",
                    "$": {
                      "schemeID": "0192"
                    }
                  }
                ]
              }
            ],
            "cac:PartyName": [
              {
                "cbc:Name": [
                  {
                    "_": "Test Company AS"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<ApplicationResponse xmlns="urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2"
					 xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
					 xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
	<cbc:CustomizationID>urn:fdc:peppol.eu:poacc:trns:invoice_response:3</cbc:CustomizationID>
	<cbc:ProfileID>urn:fdc:peppol.eu:poacc:bis:invoice_response:3</cbc:ProfileID>
	<cbc:ID>imrid001</cbc:ID>
	<cbc:IssueDate>2017-12-01</cbc:IssueDate>
	<cbc:IssueTime>12:00:00</cbc:IssueTime>
	<cbc:Note>text</cbc:Note>
	<cac:SenderParty>
		<cbc:EndpointID schemeID="0088">5798000012349</cbc:EndpointID>
		<cac:PartyIdentification>
			<cbc:ID schemeID="0184">DK88776655</cbc:ID>
		</cac:PartyIdentification>
		<cac:PartyLegalEntity>
			<cbc:RegistrationName>Buyer organization</cbc:RegistrationName>
		</cac:PartyLegalEntity>
		<cac:Contact>
			<cbc:Name>Jens Jensen</cbc:Name>
			<cbc:Telephone>23232323</cbc:Telephone>
			<cbc:ElectronicMail>jj@test-company.dk</cbc:ElectronicMail>
		</cac:Contact>
	</cac:SenderParty>
	<cac:ReceiverParty>
		<cbc:EndpointID schemeID="0088">7330001000000</cbc:EndpointID>
		<cac:PartyIdentification>
			<cbc:ID schemeID="0192">987654325</cbc:ID>
		</cac:PartyIdentification>
		<cac:PartyLegalEntity>
			<cbc:RegistrationName>Seller company</cbc:RegistrationName>
		</cac:PartyLegalEntity>
	</cac:ReceiverParty>
	<cac:DocumentResponse>
		<cac:Response>
			<cbc:ResponseCode>RE</cbc:ResponseCode>
			<cbc:EffectiveDate>2018-09-24</cbc:EffectiveDate>
			<cac:Status>
				<cbc:StatusReasonCode listID="OPStatusAction">NOA</cbc:StatusReasonCode>
				<cbc:StatusReason>VAT Reference not found</cbc:StatusReason>
				<cac:Condition>
					<cbc:AttributeID>BT-48</cbc:AttributeID>
					<cbc:Description>EU123456789</cbc:Description>
				</cac:Condition>
			</cac:Status>
		</cac:Response>
		<cac:DocumentReference>
			<cbc:ID>inv021</cbc:ID>
			<cbc:IssueDate>2018-09-22</cbc:IssueDate>
			<cbc:DocumentTypeCode>380</cbc:DocumentTypeCode>
		</cac:DocumentReference>
		<cac:IssuerParty>
			<cac:PartyIdentification>
				<cbc:ID schemeID="0192">123456785</cbc:ID>
			</cac:PartyIdentification>
			<cac:PartyName>
				<cbc:Name>Test Company AS</cbc:Name>
			</cac:PartyName>
		</cac:IssuerParty>
	</cac:DocumentResponse>
</ApplicationResponse>
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.qvalia.io/sample-data/api-sample-data/invoice/invoiceresponse.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
