> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shipstream.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Rebuild Location Profile

> Re-materializes the current definition of the Location Profile identified by the `id` and
`profile_id` path parameters, under a fresh revision. The definition itself is unchanged.

Use this to retry a `failed` build, or to force a full re-scan when locations changed in a
way the incremental pipeline could not observe. The profile keeps serving its published
revision, if it has one, until the rebuild finishes.

A successful request returns `202 Accepted`. A ready profile remains `ready` while the replacement builds,
so poll `pending_revision` rather than the top-level `status`. Successful publication is
complete when `pending_revision` becomes `null`; a failed rebuild remains present there with
a `failed` status. A second rebuild request is rejected with `422 Unprocessable Entity` while
the pending revision is still `building`; wait for that build to settle before retrying.

A profile that has never had a definition saved cannot be rebuilt — there is nothing to
re-run, and treating it as the all-locations definition would silently make it match every
location in the warehouse. Send a `PUT` with an explicit `match` instead.



## OpenAPI

````yaml POST /v1/inventory/warehouses/{id}/location-profiles/{profile_id}/rebuild
openapi: 3.0.3
info:
  title: ShipStream
  version: '1.0'
  license:
    name: Commercial (Copyright 2025 - All Rights Reserved)
    url: https://shipstream.io
  contact:
    name: ShipStream Support
    email: help@shipstream.io
  termsOfService: https://shipstream.io/legal/api-terms/
servers:
  - url: https://{base_url_domain}/api/global
    description: Direct API Url
    variables:
      base_url_domain:
        default: example.shipstream.app
        description: >-
          The fully qualified domain name for your ShipStream WMS instance. This
          is either a custom domain, or a subdomain of shipstream.app,

          and will be the same as the domain name for the page which you use to
          login to ShipStream WMS.
security:
  - ShipStream_bearerAuth: []
tags:
  - name: Warehouses
    x-displayName: Warehouses
  - name: Products
    x-displayName: Products
  - name: ProductProfiles
    x-displayName: ProductProfiles
  - name: HandlingClasses
    x-displayName: HandlingClasses
  - name: Locations
    x-displayName: Locations
  - name: LocationTags
    x-displayName: LocationTags
  - name: SlotTypes
    x-displayName: SlotTypes
  - name: Levels
    x-displayName: Levels
  - name: HoldReasons
    x-displayName: HoldReasons
  - name: Holds
    x-displayName: Holds
  - name: Replenishment
    x-displayName: Replenishment
  - name: LocationProfiles
    x-displayName: LocationProfiles
  - name: SlottingRules
    x-displayName: SlottingRules
  - name: Deliveries
    description: Every thing about a Delivery Receiving
    x-displayName: Deliveries
  - name: Shipments
    x-displayName: Shipments
  - name: Orders
    x-displayName: Orders
  - name: Retailers
    x-displayName: Retailers
  - name: Users
    x-displayName: Users
  - name: User Roles
    x-displayName: User Roles
  - name: Merchants
    x-displayName: Merchants
  - name: Healthcheck
    x-displayName: Healthcheck
paths:
  /v1/inventory/warehouses/{id}/location-profiles/{profile_id}/rebuild:
    post:
      tags:
        - LocationProfiles
      summary: Rebuild Location Profile
      description: >-
        Re-materializes the current definition of the Location Profile
        identified by the `id` and

        `profile_id` path parameters, under a fresh revision. The definition
        itself is unchanged.


        Use this to retry a `failed` build, or to force a full re-scan when
        locations changed in a

        way the incremental pipeline could not observe. The profile keeps
        serving its published

        revision, if it has one, until the rebuild finishes.


        A successful request returns `202 Accepted`. A ready profile remains
        `ready` while the replacement builds,

        so poll `pending_revision` rather than the top-level `status`.
        Successful publication is

        complete when `pending_revision` becomes `null`; a failed rebuild
        remains present there with

        a `failed` status. A second rebuild request is rejected with `422
        Unprocessable Entity` while

        the pending revision is still `building`; wait for that build to settle
        before retrying.


        A profile that has never had a definition saved cannot be rebuilt —
        there is nothing to

        re-run, and treating it as the all-locations definition would silently
        make it match every

        location in the warehouse. Send a `PUT` with an explicit `match`
        instead.
      operationId: rebuildLocationProfile
      parameters:
        - name: id
          in: path
          schema:
            type: integer
            format: int32
          required: true
          description: The `id` of the referenced `Warehouse`.
        - name: profile_id
          in: path
          schema:
            type: integer
            format: int32
          required: true
          description: The `id` of the referenced `LocationProfile`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Inventory_API_v1_LocationProfileRebuild'
      responses:
        '202':
          $ref: '#/components/responses/Inventory_API_v1_202-accepted-no-body'
        '400':
          $ref: '#/components/responses/Inventory_API_v1_400-bad-request'
        '404':
          $ref: '#/components/responses/Inventory_API_v1_404-not-found'
        '422':
          $ref: '#/components/responses/Inventory_API_v1_422-unprocessable'
        '500':
          $ref: '#/components/responses/Inventory_API_v1_500-internal-server-error'
components:
  schemas:
    Inventory_API_v1_LocationProfileRebuild:
      title: LocationProfileRebuild
      type: object
      description: >-
        The body of a Location Profile rebuild request. A rebuild takes no
        parameters — it re-runs

        the definition already saved on the profile — so this is always the
        empty object `{}`. The

        Global API requires a JSON object body on every `POST`, which is why it
        cannot be omitted.
      properties: {}
      additionalProperties: false
  responses:
    Inventory_API_v1_202-accepted-no-body:
      description: >-
        Accepted - The request was accepted and membership is being
        materialized. There is no

        response body. For a new profile, poll until `status` is `ready`. For an
        update or rebuild,

        successful publication is complete when `pending_revision` becomes
        `null`; a failed

        replacement remains present there with a `failed` status.
    Inventory_API_v1_400-bad-request:
      description: >-
        The request was invalid. The client must change the request. See the
        response body for more details.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: The error type code.
                      enum:
                        - parser
                        - parameters
                        - openapi
                    message:
                      type: string
                      description: An English sentence describing the error type.
                    details:
                      type: array
                      description: >-
                        An array of objects describing which keys are
                        responsible for the error and detailed messages
                        describing why they are not valid.
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            description: The path to the key which relates to the error.
                          message:
                            type: string
                            description: >-
                              An English sentence describing the details of the
                              error.
                        additionalProperties: false
                  additionalProperties: false
                minItems: 1
            additionalProperties: false
          example:
            errors:
              - type: parameters
                message: The supplied parameters are invalid.
    Inventory_API_v1_404-not-found:
      description: >-
        The requested resource was not found. It may have been deleted, it may
        have never existed, or you may not have permission to view it.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: The error type code.
                      enum:
                        - not_found
                    message:
                      type: string
                      description: An English sentence describing the error type.
                    details:
                      type: array
                      description: >-
                        An array of objects describing which keys are
                        responsible for the error and detailed messages
                        describing why they are not valid.
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            description: The path to the key which relates to the error.
                          message:
                            type: string
                            description: >-
                              An English sentence describing the details of the
                              error.
                        additionalProperties: false
                  additionalProperties: false
                minItems: 1
            additionalProperties: false
          example:
            errors:
              - type: not_found
                message: The server could not find the requested resource.
    Inventory_API_v1_422-unprocessable:
      description: >-
        There was an error processing the request. See the response body for
        more details.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: The error type code.
                      enum:
                        - application
                        - unable_to_process
                    message:
                      type: string
                      description: An English sentence describing the error type.
                    details:
                      type: array
                      description: >-
                        An array of objects describing which keys are
                        responsible for the error and detailed messages
                        describing why they are not valid.
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            description: The path to the key which relates to the error.
                          message:
                            type: string
                            description: >-
                              An English sentence describing the details of the
                              error.
                        additionalProperties: false
                  additionalProperties: false
                minItems: 1
            additionalProperties: false
          example:
            errors:
              - type: unable_to_process
                message: There was an error processing the request.
    Inventory_API_v1_500-internal-server-error:
      description: >-
        Internal Server Error - Something wrong happened at server side. Contact
        server administrator for more details.
  securitySchemes:
    ShipStream_bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Generate a JWT access token through a Custom Global Integration and
        provide it with each request in the `Authorization` header prefixed with
        "Bearer" and then a single space.

````