调拨单

新增调拨单

curl -i -X POST --header "Authorization: Token token=<user_token>, uid=<uid>" \
  http://example.com/api/storage_transfers.json
{
    "status": {
        "code": 200,
        "message": "OK"
    },
    "storage_transfer": {
        "id": 190
    }
}
  • HTTP请求

    POST api/storage_transfers.json

  • 请求参数说明

参数名 是否必填 默认值 字段说明
from_warehouse_id 调出仓库ID
to_warehouse_id 调入仓库ID
transferred_at 调拨时间
total_quantity 总数量
number 编号,开启自动编号后可不填,关闭自动编号后必填
note 备注
status 状态,如果关闭审批,支持draft(草稿)、submitted(提交);如果开启审批,支持draft(草稿)、approving(提交审批)
product_items_attributes[0][product_attr_group_id] 产品属性组ID
product_items_attributes[0][product_number] 产品编号
product_items_attributes[0][product_unit_id] 产品单位ID
product_items_attributes[0][batch_number] 批次号
product_items_attributes[0][produced_at] 生产日期
product_items_attributes[0][expired_at] 有效日期
product_items_attributes[0][attr_names] 属性名称
product_items_attributes[0][product_id] 产品ID
product_items_attributes[0][name] 产品名称
product_items_attributes[0][spec] 规格
product_items_attributes[0][unit] 单位
product_items_attributes[0][quantity] 数量
product_items_attributes[0][note] 备注
product_items_attributes[0][modified] 最后一次修改的字段,包括quantity、price、price_with_tax、discount、deduction、amount、tax_rate、tax_amount、amount_with_tax
product_items_attributes[0][serial_codes_attributes][0][identifier] 序列号
product_items_attributes[0][serial_codes_attributes][0][product_attr_group_id] 产品属性组ID
product_items_attributes[0][serial_codes_attributes][0][warehouse_id] 仓库ID
product_items_attributes[0][serial_codes_attributes][0][category] 类别
attachments_attributes[0][filename] 附件名称
attachments_attributes[0][url] 附件链接
  • 返回字段说明
返回值字段 字段类型 字段说明
id string ID
文档更新时间: 2025-03-17 14:52   作者:姜河