---
updatedAt: 2026-04-23T13:29:19.000Z
agentTools:
  projectIndex: https://developer.xentral.com/llms.txt
---

# Create shipping method

Creates new shipping method.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Xentral API",
    "version": "v0.1",
    "description": "Xentral is an ERP platform.",
    "contact": {
      "name": "Xentral",
      "url": "https://xentral.com",
      "email": "api@xentral.com"
    }
  },
  "tags": [
    {
      "name": "Shipping Methods",
      "description": "Shipping methods"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token obtained in POST /tokens endpoint or pregenerated in the system."
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://{xentralId}.xentral.biz",
      "description": "Your Xentral Instance",
      "variables": {
        "xentralId": {
          "default": "xentral"
        }
      }
    },
    {
      "url": "https://{domain}",
      "description": "Xentral at a custom domain",
      "variables": {
        "domain": {
          "default": "xentral.com"
        }
      }
    }
  ],
  "x-readme": {
    "samples-languages": []
  },
  "paths": {
    "/api/v1/shippingMethods": {
      "post": {
        "tags": [
          "Shipping Methods"
        ],
        "operationId": "shippingMethod.create",
        "summary": "Create shipping method",
        "description": "Creates new shipping method.",
        "requestBody": {
          "description": "Request body for creating or updating a shipping method.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "isActive": {
                    "type": "boolean",
                    "description": "Indicates if the shipping method is active.",
                    "example": true
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the shipping method.",
                    "example": "New Carrier"
                  },
                  "project": {
                    "description": "Nullable reference to another resource",
                    "type": "object",
                    "additionalProperties": false,
                    "nullable": true,
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "\\d+",
                        "example": "17",
                        "description": "Resource identifier."
                      }
                    },
                    "example": {
                      "id": "1337"
                    }
                  },
                  "carrier": {
                    "type": "object",
                    "description": "Details of the carrier providing the shipping service.",
                    "properties": {
                      "credentials": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "basic": {
                                "type": "object",
                                "properties": {
                                  "username": {
                                    "type": "string",
                                    "description": "Username used to authenticate at carrier's.",
                                    "example": "admin"
                                  },
                                  "password": {
                                    "type": "string",
                                    "description": "Password used to authenticate at carrier's.",
                                    "example": "Password"
                                  }
                                },
                                "required": [
                                  "username",
                                  "password"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "basic"
                            ],
                            "additionalProperties": false,
                            "description": "Credentials can be either basic, bearer or OAuth Client Credentials authentication."
                          },
                          {
                            "type": "object",
                            "properties": {
                              "bearer": {
                                "type": "object",
                                "properties": {
                                  "token": {
                                    "type": "string",
                                    "description": "API token used to authenticate at carrier's.",
                                    "example": "0191e008-3057-7090-8b72-8f5f31bd11ef"
                                  }
                                },
                                "required": [
                                  "token"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "bearer"
                            ],
                            "description": "Credentials can be either basic, bearer or OAuth Client Credentials authentication.",
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "oauthClientCredentials": {
                                "type": "object",
                                "properties": {
                                  "tokenUrl": {
                                    "type": "string",
                                    "description": "URL used to exchange authorization codes or credentials for an access token at carrier's.",
                                    "example": "https://example.com/oauth/token"
                                  },
                                  "username": {
                                    "type": "string",
                                    "description": "Username used to authenticate at carrier's.",
                                    "example": "admin"
                                  },
                                  "password": {
                                    "type": "string",
                                    "description": "Password used to authenticate at carrier's.",
                                    "example": "Password"
                                  },
                                  "audience": {
                                    "type": "string",
                                    "description": "Application or service that requests access to protected resources on behalf of itself.",
                                    "example": "Xentral"
                                  }
                                },
                                "required": [
                                  "tokenUrl",
                                  "username",
                                  "password"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "oauthClientCredentials"
                            ],
                            "description": "Credentials can be either basic, bearer or OAuth Client Credentials authentication.",
                            "additionalProperties": false
                          }
                        ]
                      },
                      "serviceUrl": {
                        "type": "string",
                        "example": "https://xentral.someUrl.com",
                        "description": "The base URL at which the Carrier Service that you want to connect to can be reached."
                      },
                      "id": {
                        "type": "string",
                        "description": "The unique identifier of the carrier.",
                        "example": "post-ch"
                      },
                      "product": {
                        "type": "object",
                        "description": "A shipping product is a specific service offered by a carrier.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The shipping product ID.",
                            "example": "post-ch-express"
                          }
                        },
                        "example": {
                          "product": {
                            "id": "post-ch-express"
                          }
                        }
                      },
                      "shipmentType": {
                        "type": "string",
                        "description": "A type of shipment: outbound or return.",
                        "enum": [
                          "outbound",
                          "return"
                        ],
                        "example": "outbound"
                      }
                    },
                    "example": {
                      "carrier": {
                        "credentials": {
                          "basic": {
                            "username": "your-username",
                            "password": "your-password"
                          }
                        },
                        "serviceUrl": "https://api.example.com",
                        "id": "post-ch",
                        "product": {
                          "id": "post-ch-express",
                          "shipmentType": "outbound"
                        }
                      }
                    }
                  },
                  "printers": {
                    "type": "object",
                    "description": "Details about the printers used for shipping labels and documents",
                    "properties": {
                      "label": {
                        "description": "Reference to another resource",
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "\\d+",
                            "example": "17",
                            "description": "Resource identifier."
                          }
                        },
                        "example": {
                          "id": "1337"
                        }
                      },
                      "document": {
                        "description": "Reference to another resource",
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "\\d+",
                            "example": "17",
                            "description": "Resource identifier."
                          }
                        },
                        "example": {
                          "id": "1337"
                        }
                      }
                    }
                  },
                  "parcel": {
                    "type": "object",
                    "properties": {
                      "defaultDimensions": {
                        "type": "object",
                        "properties": {
                          "length": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "number"
                              },
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "cm"
                                ]
                              }
                            }
                          },
                          "width": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "number"
                              },
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "cm"
                                ]
                              }
                            }
                          },
                          "height": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "number"
                              },
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "cm"
                                ]
                              }
                            }
                          }
                        }
                      },
                      "minimumWeight": {
                        "type": "object",
                        "description": "The minimum weight of the parcel. If the weight of the parcel is less than this value, this value will be submitted to the carrier.",
                        "properties": {
                          "value": {
                            "type": "number"
                          },
                          "unit": {
                            "type": "string",
                            "enum": [
                              "kg"
                            ]
                          }
                        }
                      }
                    }
                  },
                  "sender": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "address": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string"
                      },
                      "zip": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "examples": {
                "example": {
                  "summary": "Example of a shipping method request",
                  "value": {
                    "isActive": true,
                    "name": "New Carrier",
                    "project": {
                      "id": "123"
                    },
                    "carrier": {
                      "credentials": {
                        "basic": {
                          "username": "your-username",
                          "password": "your-password"
                        }
                      },
                      "serviceUrl": "https://api.example.com",
                      "id": "post-ch",
                      "product": {
                        "id": "post-ch-express"
                      }
                    },
                    "printers": {
                      "label": {
                        "id": "label-printer-1"
                      },
                      "document": {
                        "id": "document-printer-1"
                      }
                    },
                    "parcel": {
                      "defaultDimensions": {
                        "length": {
                          "value": 10,
                          "unit": "cm"
                        },
                        "width": {
                          "value": 10,
                          "unit": "cm"
                        },
                        "height": {
                          "value": 10,
                          "unit": "cm"
                        }
                      },
                      "minimumWeight": {
                        "value": 1,
                        "unit": "kg"
                      }
                    },
                    "sender": {
                      "id": "sender-1",
                      "name": "Sender Name"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Resource successfully created response",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "example": "https://example.xentral.biz/api/users/17"
                },
                "description": "URI of the created resource"
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    ""
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "IETF RFC 9457 Problem API compliant response",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "violations"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/request-validation"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "example": "Request payload validation failed."
                        },
                        "violations": {
                          "oneOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "example": {
                                  "username": [
                                    "This value should not be blank."
                                  ],
                                  "email": [
                                    "This value is not a valid email address."
                                  ]
                                }
                              },
                              "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages."
                            },
                            {
                              "type": "object",
                              "example": {
                                "_": [
                                  "This value should contain at most `9` elements."
                                ]
                              },
                              "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages."
                            }
                          ]
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "messages"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/generic-validation"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "messages": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "messages"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/conflict"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "messages": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "items"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/conflictItems"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "id",
                              "title",
                              "messages"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1
                              },
                              "messages": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "scopes"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://developer.xentral.com/reference/problems#token-scopes"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "messages"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/generic-validation"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "messages": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Resource representation send in the request is not supported."
          },
          "429": {
            "description": "Too many API calls made."
          }
        }
      }
    }
  }
}
```