# Build

Trigger builds for campaigns, pages, and custom components. Builds compile shop assets ready for publishing.

## Build Campaigns and Pages

> This API allows you to build Limio Campaigns and Pages in bulk, without needing to build them one by one. You can build multiple campaigns and pages at once by providing an array of items to build. This can be useful for building multiple campaigns and pages at once, for example, when you want to build a set of campaigns and pages for a new product launch.

```json
{"openapi":"3.1.0","info":{"title":"Limio Commerce API","version":"1.0.0"},"tags":[{"name":"Build","description":"Trigger builds for campaigns, pages, and custom components. Builds compile shop assets ready for publishing."}],"servers":[{"url":"https://{tenant}/api","description":"Limio environment API","variables":{"tenant":{"default":"your-environment.prod.limio.com","description":"Your Limio environment hostname, e.g. `acme.prod.limio.com` or `acme-sandbox.prod.limio.com`."}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token for authenticated API access. Required for order submission, object management, and administrative operations.\n\nObtain a token via the OAuth flow described in [OAuth Bearer Token](https://docs.limio.com/developers/api-documentation/authentication-overview/oauth-bearer-token).\n\nPass the token in the `Authorization` header: `Bearer <token>`"}},"schemas":{"BuildShopResponse":{"type":"object","properties":{"buildPaths":{"type":"array","description":"The list of campaigns and pages built"},"id":{"type":"string","description":"The unique identifier of the build"},"success":{"type":"boolean","description":"Indicates if the build has been completed"}}}},"responses":{"401Response":{"description":"Unauthorized — the request lacks valid authentication credentials. Verify your Bearer token or API key is correct and has not expired.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"502Response":{"description":"Bad Gateway — an upstream service returned an unexpected response. This typically indicates an issue with the request payload (e.g. invalid field values, missing required fields) or a transient infrastructure error. Retry the request, and if the issue persists, verify the request body matches the expected schema.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable error description."}}}}}}}},"paths":{"/shop/builds":{"post":{"description":"This API allows you to build Limio Campaigns and Pages in bulk, without needing to build them one by one. You can build multiple campaigns and pages at once by providing an array of items to build. This can be useful for building multiple campaigns and pages at once, for example, when you want to build a set of campaigns and pages for a new product launch.","operationId":"buildShop","summary":"Build Campaigns and Pages","tags":["Build"],"requestBody":{"description":"The paths of the items you want to build - for example, campaigns (starting with /offers) and pages (starting with /pages).","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"The list of campaigns and pages to build"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildShopResponse"}}}},"401":{"$ref":"#/components/responses/401Response"},"502":{"$ref":"#/components/responses/502Response"}}}}}}
```

## Get Custom Component Builds

> Retrieve build information for custom components deployed to your Limio environment. Optionally filter by a specific commit hash to see the build status of a particular code revision.

```json
{"openapi":"3.1.0","info":{"title":"Limio Commerce API","version":"1.0.0"},"tags":[{"name":"Build","description":"Trigger builds for campaigns, pages, and custom components. Builds compile shop assets ready for publishing."}],"servers":[{"url":"https://{tenant}/api","description":"Limio environment API","variables":{"tenant":{"default":"your-environment.prod.limio.com","description":"Your Limio environment hostname, e.g. `acme.prod.limio.com` or `acme-sandbox.prod.limio.com`."}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token for authenticated API access. Required for order submission, object management, and administrative operations.\n\nObtain a token via the OAuth flow described in [OAuth Bearer Token](https://docs.limio.com/developers/api-documentation/authentication-overview/oauth-bearer-token).\n\nPass the token in the `Authorization` header: `Bearer <token>`"}},"parameters":{"commitHash":{"in":"query","name":"commitHash","description":"Will retrieve the build information for the specified commit hash.","schema":{"type":"string"}}},"schemas":{"RepositoryComponentBuildsResponse":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the build","items":{"type":"string"}},"buildNumber":{"type":"string","description":"The build number of the build"},"commitId":{"type":"string","description":"The commit id which triggered the build"},"startTime":{"type":"string","description":"Indicates the time the build started"},"endTime":{"type":"string","description":"Indicates the time the build ended"},"buildStatus":{"type":"string","description":"Indicates the status of the build","enum":["SUCCEEDED","FAILED","FAULT","TIMED_OUT","IN_PROGRESS","STOPPED"]},"buildComplete":{"type":"boolean","description":"Indicates if the build has been completed"},"logErrors":{"type":"array","description":"Any error messages that occurred during the build, which may prevent the shop from building successfully"}}}},"responses":{"401Response":{"description":"Unauthorized — the request lacks valid authentication credentials. Verify your Bearer token or API key is correct and has not expired.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404RepositoryResponse":{"description":"Builds not found","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","description":"The unique identifier of the request"},"code":{"type":"string","description":"The error code"},"message":{"type":"string","description":"The error message"}}}}}}}},"paths":{"/component/builds":{"get":{"operationId":"getRepositoryComponentBuilds","summary":"Get Custom Component Builds","tags":["Build"],"description":"Retrieve build information for custom components deployed to your Limio environment. Optionally filter by a specific commit hash to see the build status of a particular code revision.","parameters":[{"$ref":"#/components/parameters/commitHash","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryComponentBuildsResponse"}}}},"401":{"$ref":"#/components/responses/401Response"},"404":{"$ref":"#/components/responses/404RepositoryResponse"}}}}}}
```
