Customization Web API: import

You can import a customization package (that is, a ZIP archive) to an MYOB Acumatica instance.

During the import, the platform uploads the customization package, creates the corresponding customization project, and saves the project in the database. As a result, the new customization project appears in the list on the Customization Projects (SM204505) form. After the import is completed, you can access the project data and manage the project.

HTTP Method and URL

To import a customization package to an MYOB Acumatica instance, you use the POST HTTP method and the following URL.

POST http()://<Acumatica ERP Instance URL>/CustomizationApi/import

You replace <MYOB Acumatica instance URL> with the URL of your MYOB Acumatica instance.

Request Body

In the request body in JSON format, you can use the fields listed in the following table.

Field Description
projectLevel The level of the customization project that is used to resolve conflicts that can arise if multiple modifications of the same items of the website are merged.
isReplaceIfExists A Boolean value that indicates (if it is set to true) that if a project with the same name exists, it should be removed.
projectName Required. The name of the customization project.
projectDescription The description of the customization project.
projectContentBase64 The contents of the customization package in Base64 format. If you do not specify the value of this field, the system will try to remove the specified customization project.

Response Body

The following table describes the field that the system returns in the body of the response.

FieldDescription
log
An array of log records. Each element of the array has the following fields:
  • timestamp: The date and time when the information about the performed operation was added to the log
  • logType: The type of the log message, which can be one of the following:
    • trace
    • information
    • warning
    • error
  • message: The log message

Example

The following request shows an example of the importing of the PhoneRepairShop customization project.
Tip:
In the request example below, <MYOB Acumatica instance URL> is the URL of the MYOB Acumatica instance (such as https://my.acumatica.com/MyInstance). You can omit the instance name in the URL (that is, you can use https://my.acumatica.com) if the instance is installed in the root of the website.
POST /<Acumatica ERP Instance URL>/CustomizationApi/import HTTP/1.1
Host: localhost
Content-Type: application/json
{
    "projectLevel": 1,
    "isReplaceIfExists": true,
    "projectName": "PhoneRepairShop",
    "projectDescription": "Customization project for the Smart Fix company",
    "projectContentBase64": "UEsDBBQAAAAIAEymBlVg2QXNohEAANxoA..."
}

If the response is 200 OK, it contains the body, which is shown in the following example.

{
    "log": [
        {
            "timestamp": "2022-08-06T17:59:55.6658507Z",
            "logType": "information",
            "message": "Create new project: PhoneRepairShop"
        }
    ]
}