# CO_TAX_JURI_REDEFINE

**SOAP v1.0.0 — ACTIVE**

## Title / 标题
**External Tax - Mass Redefine Tax Jurisdiction Code / 外部税务 - 批量重新定义税务管辖区代码**

## Operation / 操作
`TaxJurMassRedefineJurisdictionCode`

---

## Description / 描述
This synchronous outbound service sends a list of address information to the external tax system and obtains updated jurisdiction codes for mass redefinition of tax jurisdictions.

该同步出站服务向外部税务系统发送地址信息列表，并获取更新的管辖区代码，用于批量重新定义税务管辖区。

---

## Endpoint / 端点
| Environment | URL |
|-------------|-----|
| Production | `https://sap.example.com/sap/bc/srt/rfc/sap/CO_TAX_JURI_REDEFINE` |
| Test | `https://sap-test.example.com/sap/bc/srt/rfc/sap/CO_TAX_JURI_REDEFINE` |

## Message Structure / 消息结构

### Request / 请求
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `Addresses` | Table | Addresses to be redefined | 待重新定义的地址 |
| `?AddressId` | `CHAR(32)` | Address ID | 地址标识 |
| `?Street` | `CHAR(60)` | Street name and number | 街道名称和编号 |
| `?City` | `CHAR(40)` | City | 城市 |
| `?PostalCode` | `CHAR(10)` | Postal code | 邮政编码 |
| `?Region` | `CHAR(3)` | Region/State | 地区/州 |
| `?Country` | `CHAR(3)` | Country key | 国家代码 |
| `ControlData` | `TAX_CONTROL` | Control parameters | 控制参数 |
| `?Language` | `LANG(2)` | Language key | 语言代码 |
| `RequestId` | `CHAR(32)` | Request identification | 请求标识 |

### Response / 响应
| Element | Type | Description (EN) | Description (CN) |
|---------|------|------------------|------------------|
| `Return` | `BAPIRETURN` | Application log message | 应用程序日志消息 |
| `?Type` | `CHAR(1)` | Message type (S/E/W/I) | 消息类型（成功/错误/警告/信息） |
| `?Message` | `CHAR(220)` | Message text | 消息文本 |
| `RedefinedCodes` | Table | Redefined jurisdiction codes | 已重新定义的管辖区代码 |
| `?AddressId` | `CHAR(32)` | Address ID reference | 地址标识参考 |
| `?JurisdictionCode` | `CHAR(15)` | New tax jurisdiction code | 新税务管辖区代码 |
| `?Confidence` | `CHAR(1)` | Confidence level (H/M/L) | 置信度级别（高/中/低） |

---

## Example Payload / 示例负载

### Request
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TaxJurMassRedefineJurisdictionCode>
      <ControlData>
        <Language>EN</Language>
      </ControlData>
      <RequestId>REDEF-20260723-001</RequestId>
      <Addresses>
        <item>
          <AddressId>ADDR-001</AddressId>
          <Street>100 Main Street</Street>
          <City>New York</City>
          <PostalCode>10001</PostalCode>
          <Region>NY</Region>
          <Country>US</Country>
        </item>
        <item>
          <AddressId>ADDR-002</AddressId>
          <Street>200 Oak Avenue</Street>
          <City>Los Angeles</City>
          <PostalCode>90001</PostalCode>
          <Region>CA</Region>
          <Country>US</Country>
        </item>
      </Addresses>
    </TaxJurMassRedefineJurisdictionCode>
  </soap:Body>
</soap:Envelope>
```

### Response
```xml
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TaxJurMassRedefineJurisdictionCodeResponse>
      <Return>
        <Type>S</Type>
        <Message>Codes redefined successfully / 代码重新定义成功</Message>
      </Return>
      <RedefinedCodes>
        <item>
          <AddressId>ADDR-001</AddressId>
          <JurisdictionCode>US-NY-10001</JurisdictionCode>
          <Confidence>H</Confidence>
        </item>
        <item>
          <AddressId>ADDR-002</AddressId>
          <JurisdictionCode>US-CA-90001</JurisdictionCode>
          <Confidence>H</Confidence>
        </item>
      </RedefinedCodes>
    </TaxJurMassRedefineJurisdictionCodeResponse>
  </soap:Body>
</soap:Envelope>
```

---

## Error Codes / 错误代码
| Code | Description (EN) | Description (CN) |
|------|------------------|------------------|
| `TAX_101` | Address not found in external system | 外部系统中未找到地址 |
| `TAX_102` | Unable to determine jurisdiction code | 无法确定管辖区代码 |
| `TAX_103` | Maximum address limit exceeded (1000) | 超过最大地址限制（1000条） |
| `TAX_104` | Invalid country key | 无效的国家代码 |

---

## Notes / 备注
- Maximum 1000 addresses per request / 每次请求最多1000个地址
- Confidence level H=High, M=Medium, L=Low / 置信度级别 H=高，M=中，L=低
- Address validation is performed by the external tax system / 地址验证由外部税务系统执行