{"title":"Create purchaseCreditMemos","url":"https://jonas-paprotka.de/docs/dev-itpro/api-reference/v2.0/api/dynamics_purchasecreditmemo_create/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_purchasecreditmemo_create, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_purchasecreditmemo_create","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Creates a purchase credit memo object in Dynamics 365 Business Central.","date":"2026-08-21","meta":{"topic":"reference"},"outline":[{"level":2,"title":"HTTP request","slug":"http-request","at":52,"chars":219},{"level":2,"title":"Request headers","slug":"request-headers","at":271,"chars":102},{"level":2,"title":"Request body","slug":"request-body","at":373,"chars":98},{"level":2,"title":"Response","slug":"response","at":471,"chars":133},{"level":2,"title":"Example","slug":"example","at":604,"chars":3024},{"level":2,"title":"Related information","slug":"related-information","at":3628,"chars":267}],"text":"Creates a purchase credit memo in Business Central.\n## HTTP request\nReplace the URL prefix for Business Central depending on environment following the guideline<../endpoints-apis-for-dynamics>.\n```\nPOST businesscentralPrefix/companies({id})/purchaseCreditMemos({id})\n```\n## Request headers\nHeader|Value\nAuthorization|Bearer {token}. Required.\nContent-Type|application/json\n## Request body\nIn the request body, supply a JSON representation of a purchaseCreditMemo object.\n## Response\nIf successful, this method returns ```201 Created``` response code and a purchaseCreditMemo object in the response body.\n## Example\nRequest\nHere's an example of the request.\n```json\nPOST https://{businesscentralPrefix}/api/v2.0/companies({id})/purchaseCreditMemos\nContent-type: application/json\n{\n    \"number\" : \"PC1001\",\n    \"creditMemoDate\" : \"2025-04-01\",\n    \"postingDate\" : \"2025-04-01\",\n    \"dueDate\" : \"2025-04-15\",\n    \"vendorId\" : \"12345\",\n    \"vendorNumber\" : \"V001\",\n    \"vendorName\" : \"Contoso Supplies\",\n    \"payToVendorId\" : \"67890\",\n    \"payToVendorNumber\" : \"V002\",\n    \"payToName\" : \"Contoso Payables\",\n    \"buyFromAddressLine1\" : \"123 Elm Street\",\n    \"buyFromAddressLine2\" : \"Suite 100\",\n    \"buyFromCity\" : \"Redmond\",\n    \"buyFromCountry\" : \"US\",\n    \"buyFromState\" : \"WA\",\n    \"buyFromPostCode\" : \"98052\",\n    \"payToAddressLine1\" : \"456 Oak Avenue\",\n    \"payToAddressLine2\" : \"Building A\",\n    \"payToCity\" : \"Seattle\",\n    \"payToCountry\" : \"US\",\n    \"payToState\" : \"WA\",\n    \"payToPostCode\" : \"98101\",\n    \"shortcutDimension1Code\" : \"SALES\",\n    \"shortcutDimension2Code\" : \"REGION1\",\n    \"currencyId\" : \"USD\",\n    \"currencyCode\" : \"USD\",\n    \"paymentTermsId\" : \"NET30\",\n    \"shipmentMethodId\" : \"GROUND\",\n    \"purchaser\" : \"John Doe\",\n    \"pricesIncludeTax\" : true,\n    \"discountAmount\" : 50.00,\n    \"discountAppliedBeforeTax\" : true,\n    \"totalAmountExcludingTax\" : 950.00,\n    \"totalTaxAmount\" : 95.00,\n    \"totalAmountIncludingTax\" : 1045.00,\n    \"status\" : \"Open\",\n    \"lastModifiedDateTime\" : \"2025-04-01T10:00:00Z\",\n    \"invoiceId\" : \"INV12345\",\n    \"invoiceNumber\" : \"INV-2025-001\",\n    \"vendorReturnReasonId\" : \"DAMAGED\"\n}\n```\nResponse\nHere's an example of the response.\n```json\nHTTP/1.1 201 Created\nContent-type: application/json\n{\n    \"id\" : \"PC1001-ID\",\n    \"number\" : \"PC1001\",\n    \"creditMemoDate\" : \"2025-04-01\",\n    \"postingDate\" : \"2025-04-01\",\n    \"dueDate\" : \"2025-04-15\",\n    \"vendorId\" : \"12345\",\n    \"vendorNumber\" : \"V001\",\n    \"vendorName\" : \"Contoso Supplies\",\n    \"payToVendorId\" : \"67890\",\n    \"payToVendorNumber\" : \"V002\",\n    \"payToName\" : \"Contoso Payables\",\n    \"buyFromAddressLine1\" : \"123 Elm Street\",\n    \"buyFromAddressLine2\" : \"Suite 100\",\n    \"buyFromCity\" : \"Redmond\",\n    \"buyFromCountry\" : \"US\",\n    \"buyFromState\" : \"WA\",\n    \"buyFromPostCode\" : \"98052\",\n    \"payToAddressLine1\" : \"456 Oak Avenue\",\n    \"payToAddressLine2\" : \"Building A\",\n    \"payToCity\" : \"Seattle\",\n    \"payToCountry\" : \"US\",\n    \"payToState\" : \"WA\",\n    \"payToPostCode\" : \"98101\",\n    \"shortcutDimension1Code\" : \"SALES\",\n    \"shortcutDimension2Code\" : \"REGION1\",\n    \"currencyId\" : \"USD\",\n    \"currencyCode\" : \"USD\",\n    \"paymentTermsId\" : \"NET30\",\n    \"shipmentMethodId\" : \"GROUND\",\n    \"purchaser\" : \"John Doe\",\n    \"pricesIncludeTax\" : true,\n    \"discountAmount\" : 50.00,\n    \"discountAppliedBeforeTax\" : true,\n    \"totalAmountExcludingTax\" : 950.00,\n    \"totalTaxAmount\" : 95.00,\n    \"totalAmountIncludingTax\" : 1045.00,\n    \"status\" : \"Open\",\n    \"lastModifiedDateTime\" : \"2025-04-01T10:00:00Z\",\n    \"invoiceId\" : \"INV12345\",\n    \"invoiceNumber\" : \"INV-2025-001\",\n    \"vendorReturnReasonId\" : \"DAMAGED\"\n}\n```\n## Related information\nTips for working with the APIs<../../../developer/devenv-connect-apps-tips>\n../resources/dynamics_purchasecreditmemo\ndynamics_purchasecreditmemo_get\ndynamics_purchasecreditmemo_delete\nPATCH purchaseCreditMemo<dynamics_purchasecreditmemo_update>"}