2.0info: 1.152.1 Pedido description: Serviço de Pedidos do ERPX x-senior-domain: erpx_com_ven x-senior-domain-path: erpx_com_ven x-senior-service-path: pedido contact: name: Senior X Platform url: https://dev.senior.com.br email: seniorx-dev@senior.com.brhost: api.senior.com.br /erpx_com_ven/pedidosecurityDefinitions: bearerAuth: type: apiKey in: header name: Authorization – application/json – application/jsonparameters: clientId: name: client_id type: string in: header required: true description: Identificação da aplicação cadastrada no portal do desenvolvedor (api.xplatform.com.br)paths: /cancelOrders: post: description: Cancelamento do pedido
### Resources:
- res://senior.com.br/erpx_com_ven/pedido/actions/cancelOrders – Processar
x-senior-event: false deprecated: false tags: – Endpoints security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: type: object required: – ids properties: ids: type: array items: type: string description: Lista de ids dos pedidos a serem cancelados responses: 200: description: Ok schema: type: object properties: result: #/definitions/cancelOrderResult default: description: Error response schema: #/definitions/genericError /updateOrderStatusIntegration: post: description: Atualizar situação do pedido após finalização de etapa de integração
### Resources:
- res://senior.com.br/erpx_com_ven/pedido/actions/updateOrderStatusIntegration – Processar
x-senior-event: false deprecated: false tags: – Endpoints security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: type: object required: – id properties: id: type: string description: Id do pedido responses: 200: description: Ok schema: type: object required: – id properties: id: type: string description: Id do pedido 404: description: Entidade ou Registro não encontrado 403: description: Permissão negada 401: description: Usuário ou senha inválido 400: description: Requisição inválida, parâmetros obrigatórios não informados ou campo informado incorretamente default: description: Error response schema: #/definitions/genericError /updateOrderIntegrationNote: post: description: Adicionar observação histórica no pedido
### Resources:
- res://senior.com.br/erpx_com_ven/pedido/actions/updateOrderIntegrationNote – Processar
x-senior-event: false deprecated: false tags: – Endpoints security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: type: object required: – id – requestNumber – requestLink properties: id: type: string description: Id do pedido requestNumber: type: string description: Número da solicitação requestLink: type: string description: Link da solicitação responses: 200: description: Ok schema: type: object required: – id properties: id: type: string description: Id do pedido 404: description: Entidade ou Registro não encontrado 403: description: Permissão negada 401: description: Usuário ou senha inválido 400: description: Requisição inválida, parâmetros obrigatórios não informados ou campo informado incorretamente default: description: Error response schema: #/definitions/genericError /listOrders: post: description: Retorna as informações de pedidos de venda e dos seus itens
### Resources
- res://senior.com.br/erpx_com_ven/pedido/queries/listOrders x-senior-event: false deprecated: false tags: – Endpoints security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: type: object required: – pageRequest properties: initialIssueDate: type: string description: Data de emissão inicial finalIssueDate: type: string description: Data de emissão final customer: #/definitions/customer branch: #/definitions/branch number: type: integer description: Número do pedido status: #/definitions/orderStatus saleType: #/definitions/saleType externalId: type: string description: Id externo do pedido pageRequest: #/definitions/recPageRequest responses: 200: description: Ok schema: type: object required: – totalElements – orders properties: totalElements: type: integer description: Total de pedidos encontrados orders: #/definitions/order 403: description: Permissão negada 400: description: Requisição inválida, parâmetros obrigatórios não informados ou campo informado incorretamente default: description: Error response schema: #/definitions/genericError get: description: Retorna as informações de pedidos de venda e dos seus itens
### Resources
- res://senior.com.br/erpx_com_ven/pedido/queries/listOrders x-senior-event: false deprecated: false tags: – Endpoints security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: type: object required: – pageRequest properties: initialIssueDate: type: string description: Data de emissão inicial finalIssueDate: type: string description: Data de emissão final customer: #/definitions/customer branch: #/definitions/branch number: type: integer description: Número do pedido status: #/definitions/orderStatus saleType: #/definitions/saleType externalId: type: string description: Id externo do pedido pageRequest: #/definitions/recPageRequest responses: 200: description: Ok schema: type: object required: – totalElements – orders properties: totalElements: type: integer description: Total de pedidos encontrados orders: #/definitions/order 403: description: Permissão negada 400: description: Requisição inválida, parâmetros obrigatórios não informados ou campo informado incorretamente default: description: Error response schema: #/definitions/genericError /externalServiceOrderFinished: post: description: Evento para validação da nota x-senior-event: true deprecated: false tags: – Events security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: type: object properties: externalServiceOrderFinished: #/definitions/recExternalServiceOrder responses: 200: description: Ok default: description: Error response schema: #/definitions/genericError /apis/item: post: description: The create request primitive for the item facade. deprecated: false tags: – Apis security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: #/definitions/item responses: 200: description: Ok schema: #/definitions/item default: description: Error response schema: #/definitions/genericError /apis/item/{id}: put: description: The update request primitive for the item facade. deprecated: false tags: – Apis security: – bearerAuth: [] parameters: – #/parameters/clientId – name: id in: path required: true type: string – name: input in: body required: true schema: #/definitions/item responses: 200: description: Ok schema: #/definitions/item default: description: Error response schema: #/definitions/genericError /apis/order: post: description: The create request primitive for the order facade. deprecated: false tags: – Apis security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: #/definitions/orderFacadeInput responses: 200: description: Ok schema: #/definitions/orderFacadeOutput default: description: Error response schema: #/definitions/genericError /apis/order/{id}: get: description: The retrieve request primitive for the order facade. deprecated: false tags: – Apis security: – bearerAuth: [] parameters: – #/parameters/clientId – name: id in: path required: true type: string responses: 200: description: Ok schema: #/definitions/orderFacadeOutput default: description: Error response schema: #/definitions/genericErrordefinitions: saleType: type: string enum: – ORDER – BUDGET orderStatus: type: string enum: – IN_PROGRESS – ORDER_CREATED – NOT_PAID – PAID – INVOICED – CANCELED – ERROR enumTypeOrder: type: string enum: – Asc – Desc enumTipImpDoc: type: string enum: – IPI – IPI_PRESUMIDO – IPI_DEVOLVIDO – IPI_CREDITADO – ICMS – ICMS_SIMPLES – ICMS_FUTURO – ICMS_DIFERIDO – ICMS_DESONERADO – ICMS_ST – ICMS_UF_DESTINO – ICMS_ISENTAS_OUTRAS – ICMS_CREDITADO – ICMS_EFETIVO – ICMS_ST_RETIDO_ANT – ICMS_ST_FUTURO – ICMS_ST_SOLIDARIO – ICMS_IMPORTACAO – ICMS_DESTINO – FCP – FCP_ST – FCP_UF_DESTINO – FCP_ST_RETIDO_ANT – ISS – COFINS – COFINS_RETIDO – COFINS_RECUPERAR_IMPORTACAO – COFINS_RECUPERAR – COFINS_DEVOLVIDO – PIS – PIS_RETIDO – PIS_RECUPERAR_IMPORTACAO – PIS_RECUPERAR – PIS_DEVOLVIDO – CSLL – ISS_RETIDO – IRRF – INSS – INSS_PATRONAL – IMPOSTO_IMPORTACAO – DIFAL – DIFAL_DEVOLVIDO – CIDE_TECNOLOGIA – FUNRURAL_INSS – FUNRURAL_RAT – FUNRURAL_SENAR – FUNRURAL_TOTAL enumCifFob: type: string enum: – V0 – V1 – V2 – V3 – V4 – V9 externalIntegration: type: string enum: – ECOMMERCE – CRM – FORCA_DE_VENDA recExternalServiceOrder: type: object properties: orderId: type: string description: Id do pedido company: #/definitions/company branch: #/definitions/branch customer: #/definitions/customer orderNumber: type: integer description: Número do pedido issueDateTime: type: string description: Data e hora de emissão do pedido format: date-time equipmentId: type: string description: Id do equipamento do pedido newEquipmentDescription: type: string description: descrição do novo equipamento items: type: array items: #/definitions/recItem description: lista com os itens do pedido company: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro branch: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro customer: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro taxNumber: type: string description: CNPJ/CPF stateRegistration: type: string description: Inscrição Estadual personAddress: #/definitions/personAddress taxPayer: type: boolean description: Indicativo se o cliente é contribuinte de ICMS e007ufs_id: type: string description: ID do estado personAddress: type: object required: – cep – address – number – complement – neighborhood properties: cep: type: integer description: CEP country: #/definitions/country city: #/definitions/city state: #/definitions/state address: type: string description: Endereço number: type: string description: Número complement: type: string description: Complemento neighborhood: type: string description: Bairro country: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro city: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro state: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro initials: type: string description: Sigla recItem: type: object properties: id: type: string description: Id do item do pedido sequence: type: integer description: Sequência do item itemService: #/definitions/recService itemProduct: #/definitions/recProduct quantity: type: number description: Quantidade do item format: double price: type: string description: Preço do item discount: type: string description: Desconto do item netValue: type: string description: Valor líquido do item recService: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro recProduct: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro ctrLot: type: boolean description: Controla lote ctrSep: type: boolean description: Controla série recPageRequest: type: object required: – offset – size properties: offset: type: integer description: Offset da página size: type: integer description: Size da página orderyBy: type: array items: #/definitions/recFieldsOrderBy description: Campos da ordenação dos registros a serem pesquisados recFieldsOrderBy: type: object required: – field – order properties: field: type: string description: Nome do campo a ser ordenado order: #/definitions/enumTypeOrder cancelOrderResult: type: object required: – id – company – branch – number – issueDateTime – customer – status properties: id: type: string description: Id do pedido company: #/definitions/recDefaultData branch: #/definitions/recDefaultData number: type: integer description: Número do pedido issueDateTime: type: string description: Data e hora de emissão format: date-time customer: #/definitions/recDefaultData status: type: string description: Situação do cancelamento messages: type: array items: type: string description: Mensagem de retorno recDefaultData: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro order: type: object required: – number – status – customer – itens – totalPaid – taxes properties: id: type: string description: Id do pedido errorMessage: type: string description: Mensagem de erro company: #/definitions/company branch: #/definitions/branch number: type: integer description: Número do pedido status: #/definitions/orderStatus issueDate: type: string description: Data de emissão format: date-time expectedDeliveryDate: type: string description: Data de entrega prevista format: date customer: #/definitions/customer shippingCompany: #/definitions/transporter redispatchCompany: #/definitions/transporter representative: #/definitions/representative shippingAddress: #/definitions/shippingAddress paymentTerms: #/definitions/termsPayment itens: type: array items: #/definitions/item description: Informações dos itens observation: type: string description: Observação do pedido shippingCost: type: string description: Valor de frete freightType: #/definitions/enumCifFob totalPaid: type: string description: Valor total discount: type: string description: Valor total de desconto taxes: type: array items: #/definitions/tax description: Impostos totalizados no pedido auditing: #/definitions/auditing customerOrderNumber: type: string description: Número do pedido do cliente fiscalAddress: #/definitions/fiscalAddress transporter: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro representative: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro shippingAddress: type: object properties: document: type: string description: Número do CPF/CNPJ name: type: string description: Nome completo address: type: string description: Endereço addressNumber: type: string description: Número do endereço addressComplement: type: string description: Complemento do endereço neighborhood: type: string description: Bairro postCode: type: string description: CEP phone: type: string description: Telefone celphone: type: string description: Celular termsPayment: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro item: type: object required: – quantity properties: id: type: string description: Id do item product: #/definitions/recProduct order: #/definitions/orderInformation serviceItem: #/definitions/recService saleMeasureUnit: #/definitions/recDefaultData price: type: string description: Preço unitário quantity: type: number description: Quantidade pedida format: double total: type: string description: Valor total discount: type: string description: Valor de desconto expectedDeliveryDate: type: string description: Data de entrega prevista format: date observation: type: string description: Observação do item do pedido taxes: type: array items: #/definitions/tax description: Impostos dos itens priceList: #/definitions/recDefaultData customerOrderNumber: type: string description: Número do pedido do cliente customerOrderItemSequence: type: string description: Sequencia do item no pedido do cliente invoices: type: array items: #/definitions/invoice description: Notas fiscais productTransaction: #/definitions/recDefaultData serviceTransaction: #/definitions/recDefaultData orderInformation: type: object properties: id: type: string description: Id do pedido company: #/definitions/company branch: #/definitions/branch number: type: integer description: Número do pedido saleType: #/definitions/saleType tax: type: object required: – type properties: basis: type: string description: Base de cálculo value: type: string description: Valor de imposto rate: type: number description: Alíquota do imposto format: double type: #/definitions/enumTipImpDoc invoice: type: object properties: quantity: type: number description: Quantidade faturada format: double value: type: string description: Valor faturado number: type: integer description: Número da nota fiscal issueDate: type: string description: Data de emissão format: date-time auditing: type: object properties: createBy: type: string description: Usuário de criação createdDate: type: string description: Data de criação format: date-time lastModifiedBy: type: string description: Último usuário de alteração lastModifiedDate: type: string description: Última data de alteração format: date-time fiscalAddress: type: object properties: address: type: string description: Endereço addressNumber: type: string description: Número do endereço addressComplement: type: string description: Complemento do endereço neighborhood: type: string description: Bairro postCode: type: string description: CEP city: type: string description: Cidade state: type: string description: Sigla da UF country: type: string description: País phone: type: string description: Telefone stateRegistration: type: string description: Inscrição estadual orderFacadeInput: type: object required: – company – branch – customer – items properties: id: type: string description: format: uuid company: #/definitions/company branch: #/definitions/branch customer: #/definitions/customer representative: #/definitions/representative paymentTerms: #/definitions/recDefaultData paymentMethod: #/definitions/paymentMethod shippingCompany: #/definitions/recDefaultData redispatchCompany: #/definitions/recDefaultData deliveryAddress: #/definitions/recDefaultData issueDate: type: string description: Data de emissão format: date items: type: array items: #/definitions/item description: Informações dos itens externalId: type: string description: Identificação externa do pedido observation: type: string description: Observação do pedido shippingCost: type: string description: Valor de frete discount: type: string description: Valor total de desconto close: type: boolean description: Fechar pedido origin: #/definitions/externalIntegration expectedDeliveryDate: type: string description: Data de entrega prevista format: date freightType: #/definitions/enumCifFob customerOrderNumber: type: string description: Número do pedido do cliente keepInstallments: type: boolean description: Manter parcelas no faturamento fiscalAddress: #/definitions/recDefaultData productTransaction: #/definitions/recDefaultData serviceTransaction: #/definitions/recDefaultData paymentMethod: type: object properties: id: type: string description: Id do registro code: type: string description: Código do registro description: type: string description: Descrição do registro tradeName: type: string description: Nome fantasia do registro orderFacadeOutput: type: object required: – company – branch – customer – items – taxes properties: id: type: string description: Id da entidade company: #/definitions/company branch: #/definitions/branch customer: #/definitions/customer representative: #/definitions/representative paymentTerms: #/definitions/recDefaultData paymentMethod: #/definitions/paymentMethod shippingCompany: #/definitions/recDefaultData redispatchCompany: #/definitions/recDefaultData issueDate: type: string description: Data de emissão format: date items: type: array items: #/definitions/item description: Informações dos itens externalId: type: string description: Identificação externa do pedido observation: type: string description: Observação do pedido shippingCost: type: string description: Valor de frete discount: type: string description: Valor total de desconto close: type: boolean description: Fechar pedido origin: #/definitions/externalIntegration total: type: string description: Valor líquido total do pedido taxes: type: array items: #/definitions/tax description: Impostos do pedido expectedDeliveryDate: type: string description: Data de entrega prevista format: date freightType: #/definitions/enumCifFob auditing: #/definitions/auditing customerOrderNumber: type: string description: Número do pedido do cliente genericError: properties: message: type: string description: Messaging describing the error. reason: type: string description: A symbolic code identifying the category of the reason of the error. enum: – BAD_REQUEST – UNAUTHORIZED – PAYMENT_REQUIRED – FORBIDDEN – OBJECT_NOT_FOUND – REQUEST_TIMEOUT – GONE – UNPROCESSABLE – INTERNAL_ERROR – NOT_IMPLEMENTED – SERVICE_UNAVAILABLE – INSUFFICIENT_STORAGE